4 ms·
Some of the most creative people I know swear by functional programming, even for livecoding. I just can't see it, but this is more evidence for why I'm the on
by yarrel 11y ago
Some of the most creative people I know swear by functional programming, even for livecoding.
I just can't see it, but this is more evidence for why I'm the one in the wrong.
- taeric 11y agoConversely, many of the most creative programming artifacts out there are not functional. So, I'm not sure what the evidence is here. Can people do amazing things with tools? Yes. Is there evidence that some tools enable more creativity than others? I'm not so sure.
- yarrel 11y agoI'm more surprised that they can use functional programming creatively at all, particularly in realtime. Although to be fair I have the same reaction to Processing.
- mraison 11y agoI think dynamic functional programming languages such as Clojure are great for "creative coding" because they go straight to the point. You don't have to instantiate complicated objects, create classes all over the place, or consider every single code path to make the type checker happy. An advantage they have over non-functional (or "less functional") scripting languages such as Python or Javascript is the ability to move code easily without breaking anything (because most functions are pure).
- Dewie3 11y ago> to make the type checker happy I like that rhetorical device. So subtle.
- taeric 11y agoProcessing would make a good case that it is dynamic languages that help moreso than functional. Specifically, dynamic in that you can interact with a running program easily. This really does get into a lot of the power of many lisp setups. It is not so much that there is a REPL. There is a nice ready made hook into a running system.
- kyllo 11y agoI think Clojure is especially well suited for creative programming because the REPL-based workflow is very interactive and the language itself is so easy to mold and shape as you're exploring the problem domain. Composable functions plus macros means it's super easy to build custom abstractions and DSLs for what you're trying to do. Of course there are other languages that also support this to different extents, but Clojure and Lisp/Scheme family languages in general seem particularly well-suited for exploratory and creative programming because of the REPL, homoiconicity and macro system.
- hga 11y agoLet me add that REPL based workflow is great when you can't write unit tests for whatever reason, you can test each bit of code in the REPL as you write it. The more functional the language and your code, the more sure you can be that your informal testing will stay valid. The more your data is immutable, the easier that testing can be. If you grok it, with some practice it can work very well. I would be surprised if it couldn't work well for livecoding for some people.