
Developing Games in Elm - lelf
http://gelatindesign.co.uk/developing-games-in-elm/functional-programming/
======
thorn
There is nothing about developing games in this article! I do not understand
why they put such title at all.

~~~
lsjroberts
Hi, author here. The reason is because I am using elm to develop games and
this is the first in a series I'll be writing as I learn about doing that.
It's largely just me collecting my thoughts as I learn.

------
btzll
The title should be "Useful Elm code which could be useful if you decide to
code a game in Elm", not "Developing Games in Elm".

~~~
CmonDev
This is typical for functional languages:

1) build a functional language with lots of features but having a really weird
ML-style syntax (because 'succinct' and "you don't need those braces")

2) create a try[lang name].com website

3) ?

4) Profit!

[http://en.wikipedia.org/wiki/Gnomes_(South_Park)](http://en.wikipedia.org/wiki/Gnomes_\(South_Park\))

~~~
zem
ML syntax is only weird if you consider C/ALGOL style the one true normal. if
nothing else, the fact that so many languages use it should remove it from the
"weird" category; it's simply the style that matches ML-style programming most
pleasantly.

~~~
CmonDev
"most pleasantly" \- that is also very subjective.

------
iraldir
I'd love to see an actual game code using FP. Like a snake or something. Is
there any performance advantage?

~~~
pjmlp
Check "Nikki and the Robots".

It was done in Haskell and available on Steam.

John Carmack also did a port of Wolf3D to Haskell, during his FP experiments.

[https://twitter.com/id_aa_carmack/status/331918309916295168](https://twitter.com/id_aa_carmack/status/331918309916295168)

------
Pamar
Stupidly enough, right before clicking on the article I thought that Elm
([http://en.wikipedia.org/wiki/Elm_%28email_client%29](http://en.wikipedia.org/wiki/Elm_%28email_client%29))
had somehow reached a level of complexity comparable to EMACS...

------
sanatgersappa
Loved the explanation of Composition.

~~~
RobotCaleb
Same, but I feel like I'm missing something with one of the examples.

squareIsOdd = square >> isEven >> not -- `not` is a built-in function that
inverts booleans

squareIsOdd 3 == True squareIsOdd 7 == False <\-- huh?

~~~
joshschreuder
Yeah I didn't get that either, shouldn't that be False both times? 3^2 = 9 and
7^2 = 49, both odd.

~~~
lsjroberts
Hah, woops. Author here, I switched between odd and even and forgot to update
the numbers... I'll fix it.

