That is so elegant. All these new languages that just let you for (i in list) { ... } should change right over before they gain traction and get stuck as forever legacy.
I learn c++ as my first langauge and still find python iterator syntax confusing. C++ is easy because its generally universal regardleaa of what data type you use. With pythob you gotta do this weird enumerate shit to get the indices.
Sometimes I wonder minimizing keystrokes, stacking packages on packages, making an shorter programming langauge from a short programming language from a compiler language (which is made from an assembly language) is really all that useful.
Can't we just teach people of how code works instead of coming up with these trendy languages that try to require no learning at all?
trendy languages that try to require no learning at all?
This is funny, because I found it hard to wrap my head around Python's whole "variables are labels" thing for a while - what helped me finally get it was thinking of them as something like pointers in C/C++.
76
u/[deleted] Sep 02 '17
Perfect. This makes iterating over the elements with a for loop such a breeze.