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 Python Language Problems]
- 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
See also: [Iterators: Signs of Weakness in Object-Oriented Languages By Henry G Baker. At http://home.pipeline.com/~hbaker1/Iterator.html 〔local copy Iterators_Signs_of_Weakness_in_Object_Oriented_Languages__Henry_G_Baker__1992.txt ]〕
Google Plus discussion
Programing Language Design
- What's Ontology of Programing Language?
- A Class of Computer Languages: Math Languages
- Why I Hate Exceptions
- Iterator, Enumerator, Abstraction Went Wrong
- Language Design: Should Array Index Start at 0 or 1?
- Syntactic Semantic Difference of Map
- Should Map f Specify Order?
- Function Dependency
- Why I Hate C
- The Complexity of Java Access Specifiers
If you have a question, put $5 at patreon and message me.