News for hackers. Stuff that matters.
Re:A success story for Haxe by joneil on Saturday March 14, 2015 @09:19AM (#9202526)
Haha, I was the one that wrote that example for the homepage. It was never meant to be a comment on the ideal data structures for different use cases. Rather it's just there to give developers a taste of the syntax: there's more semicolons and brackets than Python, less explicit typing than Java.

If you have an example of a better code sample for introducing language syntax, I'd love to see it so I can learn from it.

Re:A success story for Haxe by brianberns on Wednesday March 25, 2015 @12:18AM (#9261261)
My point is that if you're going to iterate through the entire dictionary, there should be a way to get full key-value pairs, so you don't have to look up the value for each key. There's no need to change the entire example. Something like this:

        for ((name, job) in people) {
          trace('$name does $job for a living!');
        }