Comp Lang: Iterator, Enumerator, Abstraction Went Wrong (2016)
Iterator, Enumerator, Abstraction Went Wrong
in programing, there's iterator and enumerator. (For example, Java, Python.) I really hate them. But, am thinking, just what is the reason i dislike them? I think the reason is, abstraction went wrong.
twitter tweet binge:
- xah's edu corner EXTEMPORE! the story of hatred of iterator and enumerator
- reading clojure doc about its data structure coll and seq. clojure is intertwined with java. It says iterator and iterable. but whats iterable? 〔see Why Clojure is Dense〕
- well, java Iterable is just a Java “Interface”. turns out, java Collection is extended from Iterable.
- golly, i truly hate the iterator thing. iterator by the way, its the abstraction of i in for loop. instead of i++, you use it.next() instead.
- Then, there's enumerator. the diff of iterator and enumerator is that, iterator has method to let you delete elements
- iterator and enumerators, worst thing in programing. And, it is from shit the likes of Java and Python. It's a OOP thing. 〔see Why Python Sucks〕
- in programing, u have a list, u need to go thru it, then u access by index. that's concrete, basic, it's math! (or use map)
- but iterator is an “abstraction”! isn't it then, better?
- without abstraction, you have concrete, natural order, the physics, the math. Its written in stone by god, definite, concrete, absolute.
- but abstraction make things manageable, but, you begin to have the question of, what and how, who is right?
- with abstraction, correctness is lost. you have 1 billion ways to abstract things. stone can be river, 1+1 can be 3, and tao of mumbo-jumbo
Google Plus discussion
https://plus.google.com/+XahLee/posts/R9WsnYaRpw7
history of programing language. iterators and infinity
- in programing languages, in the original iterators, does it allow infinite items
- https://x.com/i/grok/share/UY7Yi2MzfZ3S7sjuRuQ6AuH0M


Programing Language Design
- Ontology of Programing Languages
- Comp Lang: Why I Hate Exceptions
- Comp Lang: Iterator, Enumerator, Abstraction Went Wrong (2016)
- Comp Lang: Should Array Index Start at 0 or 1?
- Why C Language Has the Main Function?
- Comp Lang: is the Map Function Functional Programing in Syntax or Semantics
- Comp Lang: Should Map Function Specify Order
- Comp Lang: Abuse of Logic Operators (Short-Circuit) as Control Flow
- Comp Lang: Bit Operators Idiocy
- Comp Lang: Hack of Bitmask as Boolean Parameters
- Comp Lang: Function Dependency
- The Complexity of Java Access Specifiers
- Comp Lang: C Cpp Java Coders Don't Know Scientific Programing Languages