(no title)
Aardappel | 6 months ago
It comes with a tiny minecraft clone in < 100 lines of Lobster.
Agreed it could use more actual game examples. I've written a ton of game prototypes in it, and some could do with open sourcing, just haven't gotten around to it.
dr_kiszonka|6 months ago
I noticed that Lobster, like many other languages, does not use the C style for-loop syntax, `for (int i = 0; i < m; i++): print(i);`. Could you say why that is? I have been writing Python for many years but still miss that C syntax. Initiating `i` right before every loop feels clunky to me.
Aardappel|6 months ago
The syntax comes from the observation that even in C-like languages, 99% of the time I want to iterate over the range (0..m-1), so that's what it is optimized for.
I don't enjoy writing the same boilerplate over and over. Moreover, because it is so verbose, it is hard to spot `for (int i = 0; i <= m; i++): print(i);` being a special kind of loop since it looks so similar to the common `<` case. I'd rather that looks entirely different to alert me we're also iterating over the bound.
I am not sure what you mean by "Initiating `i` right before every loop"
benrutter|6 months ago
klaussilveira|6 months ago
It brings the joy back to graphics and game programming.