News for hackers. Stuff that matters.
Re:Atom Shell is now Electron by jsprogrammer on Thursday April 23, 2015 @08:48PM (#9430836)
> Why would you create an array of empty elements to iterate over just to grab the index?

Because it's the shortest way to do it in that language.

I think something like:

    [A-Z].reverse
or:

    reverse([A-Z])
might even be better. Do you know of a language with that syntax?
Re:Atom Shell is now Electron by spinlock on Friday April 24, 2015 @12:05AM (#9431384)
If you want an index, use an index:

    for (1 = 65; i <= 90; i++){...}
It's not like the syntax is that bad. But, iterators are simpler than indexing a collection. Iterators work with data structures like linked lists where you don't really have an index. And, they work when the collection changes while you're iterating it.
Re:Atom Shell is now Electron by jsprogrammer on Friday April 24, 2015 @12:37AM (#9431452)
But you can't also output an array without additional lines of code.
Re:Atom Shell is now Electron by spinlock on Friday April 24, 2015 @12:04PM (#9434224)
You still haven't realized that _your_ solution won't output anything without additional lines of code, have you?
Re:Atom Shell is now Electron by jsprogrammer on Friday April 24, 2015 @07:35PM (#9436532)
I have, except that it's not really my solution. I was just cleaning up the example to make it more readable, as that seemed to be one of the complaints of the OP.