4 ms·
> it was the structural constraint of already being in an immutable context that prompted the cleaner design. Yes! This is what I think most languages retrofit
by macintux 7y ago
> it was the structural constraint of already being in an immutable context that prompted the cleaner design.
Yes! This is what I think most languages retrofitted to include functional features miss: the constraints of immutability and (customarily) no global variables force you to think about what data you actually need where, and often lead to a cleaner design.
Constraints are incredibly valuable.
- dkersten 7y agoConstraints are necessary for ingenuity and creativity too. Also, those constraints create consistency though necessity. For example, you can write immutable code in Javascript/Python/Whatever, but because it doesn't force it on you through constraints of the language, you have no guarantees that other parts of the application follows your immutability rules, so many of the benefits are lost. Being able to make assumptions about a program, because the language enforces them to be true, is very useful.
- reificator 7y agoEven when a language allows mutability, just having immutability by default makes a huge difference.
- dkersten 7y agoSure, I mean, every useful language must have some form of mutable state, after all. Defaults are important!
- voxl 7y agoConstraints are not necessary for creativity.
- tlb 7y agoWhat would you point to as the most creative thing done with zero constraints?
- stonesixone 7y agoSpeaking personally, I would say I'm most creative when dreaming (where there are no constraints).
- artificialLimbs 7y agoTo be entirely pedantic, there are constraints on intention, objectives/aims/goals, and relation(as in with others).
- dkersten 7y agoIf we're talking anecdotes, I've always been most creative when I have tight constraints to work within (technical, time, aesthetic etc). For example, some of my most imaginative code was when trying to fit some code into a teeny tiny microcontroller. Some of the most fun too (provided that time wasn't also a constraint, I find that mixing a time constraint with other constraints often turns it from a fun puzzle to a stressful task).
- macintux 7y ago“Necessary” might be too strong of a word, but it’s certainly valuable. * https://hackernoon.com/constraints-and-creativity-14831a538643 https://hackernoon.com/constraints-and-creativity-14831a5386... * https://www.fastcompany.com/3027379/the-psychology-of-limitations-how-and-why-constraints-can-make-you-more-creative https://www.fastcompany.com/3027379/the-psychology-of-limita... * https://www.forbes.com/sites/groupthink/2013/07/12/creativity-how-constraints-drive-genius/ https://www.forbes.com/sites/groupthink/2013/07/12/creativit...
- toast0 7y ago> force you to think about what data you actually need where, and often lead to a cleaner design. This is key. Because you have to be explicit about what state is retained, and how it is passed, you are forced to consider it more carefully. For most software, operating on data and storing state are the most important things -- it feels right to be forced to focus on it.