λ: 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 Hard to Learn (2016)〕
- 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. Index〕
- 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
- λ: Why I Hate Exceptions
- λ: Iterator, Enumerator, Abstraction Went Wrong (2016)
- λ: Should Array Index Start at 0 or 1?
- Why C Language Has the Main Function
- λ: is the Map Function Functional Programing in Syntax or Semantics
- λ: Should Map Function Specify Order
- Coding Style: Abuse of Logic Operators (Short-Circuit) as Control Flow (2015)
- λ: Bit Operators Idiocy
- λ: Hack of Bitmask as Boolean Parameters (2007)
- λ: Function Dependency
- The Complexity of Java Access Specifiers
- λ: C Cpp Java Coders Don't Know Scientific Programing Languages (2015)
Object Oriented Programing
- Object Oriented Programing Jargons and Complexities (Explained as Functional Programing)
- History of Object Oriented Programing, by Casey Muratori (2025)
- Object Oriented Programing, Origin of Inheritance (Simula)
- Alan Kay on Object Oriented Programing
- λ: Iterator, Enumerator, Abstraction Went Wrong (2016)
- Iterators: Signs of Weakness in Object-Oriented Languages (By Henry G Baker, 1992)
- Jargon: Polymorphism and Dispatch (2015)
- Meaning of Object in Computer Languages