Re:Eta – A powerful language for building scalable systems o...
by rahulmutt on Wednesday January 11, 2017 @01:16PM
(#13376081)
I agree that it's not a good implementation, as I said it's for illustrative purposes. You also don't implement the "Hello World!" program ever in real life, yet every programming language intro starts with that. Relative to that, a sorting algorithm is a lot more instructive. I think if I changed the name of 'quicksort' to 'sortUniqueList' that would clear things up.
Re:Eta – A powerful language for building scalable systems o...
by taeric on Wednesday January 11, 2017 @01:35PM
(#13376256)
Hmm... fair. I am criticizing something without a suggestion.
I don't have one and I confess that worries me. In trying to teach my children, I have actually grown away from the "this is what the code looks like" to examples. And I commend the site for doing that. 2048 seems like an odd example, but conciseness is the goal, I'm guessing. Still a fun one. (Snake would be more fun for kids, I'm guessing. But that is just a guess.)
Re:Eta – A powerful language for building scalable systems o...
by rahulmutt on Wednesday January 11, 2017 @02:01PM
(#13376505)
2048 was just convenient. It just so happens that there was an existing Haskell project that used the native GLTK library. I just swapped that out with JavaFX and it worked. If I were to write a book on Eta, I would certainly use a simpler game! I personally learned to code as a child by playing with examples and developing a game, so I can bet your kids are going to grasp programming fast. The human brain learns naturally from examples as opposed to theory.
First, this is not a good implementation of quicksort. Second, it is not often that people will be implementing quicksort.