Comp Lang: Iterator, Enumerator, Abstraction Went Wrong (2016)

By Xah Lee. Date: . Last updated: .

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:

  1. xah's edu corner EXTEMPORE! the story of hatred of iterator and enumerator
  2. 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
  3. well, java Iterable is just a Java “Interface”. turns out, java Collection is extended from Iterable.
  4. 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.
  5. Then, there's enumerator. the diff of iterator and enumerator is that, iterator has method to let you delete elements
  6. 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
  7. 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)
  8. but iterator is an “abstraction”! isn't it then, better?
  9. without abstraction, you have concrete, natural order, the physics, the math. Its written in stone by god, definite, concrete, absolute.
  10. but abstraction make things manageable, but, you begin to have the question of, what and how, who is right?
  11. 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

iterator infinite cpp java 2025-06-01 25059
iterator infinite cpp java 2025-06-01 25059
history iterator infinite CLU 2025-06-01 24ff6
history iterator infinite CLU 2025-06-01 24ff6

Programing Language Design

Object Oriented Programing Shams