3 ms·
Languages like Idris and Haskell have a big learning curve along with fixed costs around missing ecosystem. But once you pay those off, they allow for single de
by whateveracct 7y ago
Languages like Idris and Haskell have a big learning curve along with fixed costs around missing ecosystem. But once you pay those off, they allow for single developers or small teams to manage large amounts of complexity and get lots of things "for free" thanks to their composition- and data-oriented nature. A level editor and scripting engine are actually the exact sorts of things I'd expect Idris or Haskell or the like to make noticeably easier than other languages!
- eyegor 7y agoEh, I'm not sure the level editor/scripting comes from the language so much as the nature of game dev. I've written a hobby 2d engine + game before, level design is a hell of a lot easier if you build an editor to do it in. Same with scripting for enemy behaviors. I wrote one in c++ and another in Java, both ended up with level editors and a limited scripting language designed for my own benefit. Once you have them, it speeds up actual game development immensely.
- whateveracct 7y agoYeah I agree. But what I was saying is that implementing the level editor / scripting engine is a class of application where pure FP tends to shine.
- anentropic 7y agoThis is an interesting point. As a humble pythonist I would like to hear more about why that is... thanks!
- eyegor 7y agoFor language design, fp tends to make things a lot easier to represent. Any parser-type application is going to be a recursive structure with a lot of continuations which is the natural way of coding in a functional lang. If you ever look into language design or compilers, you'll see that things are generally written as sum types in bnf, cnf, etc [0]. Basically all fp langs implement sum types, so you can practically translate theory 1-1 into code. I guess you could think of a level editor as a type of language, it's just so minimal that I don't. [0] http://www.cs.man.ac.uk/~pjj/farrell/comp2.html http://www.cs.man.ac.uk/~pjj/farrell/comp2.html