4 ms·
I just wonder if the advantages you're talking about have anything to do with the functional nature of the language or not. Maybe an imperative language with a
by bvinc 8y ago
I just wonder if the advantages you're talking about have anything to do with the functional nature of the language or not. Maybe an imperative language with a strong type system and without exceptions would have the same effect?
Maybe it's just a general nudging of the language that makes it hard to write bad code?
What if you converted the Scala code back to python? Would it have the same good design? And then, even if it's possible to write beautifully designed code in Python, does it even matter if teams consistently end up writing bad code?
Yeah, this is a hard thing to quantify and a formal proof challenge doesn't really help.
- lmm 8y ago> Maybe an imperative language with a strong type system and without exceptions would have the same effect? In what sense would such a language be imperative? Are you talking about allowing state mutation? I'm pretty sure that would introduce most of the problems the Python had. Functional is not so much a thing as the absence of a thing - an imperative language (i.e. a language in which evaluation order is visible and relevant) essentially consists of a functional language plus one or more unmanaged noncommutative effects. > What if you converted the Scala code back to python? Would it have the same good design? And then, even if it's possible to write beautifully designed code in Python, does it even matter if teams consistently end up writing bad code? Good coding is refactoring, just as good writing is rewriting. If you converted the Scala back to Python it would have its current beautiful design for now, but as you worked on it the design would decay, because it's so much harder to safely refactor imperative and untyped code, so you do less of it, and it becomes harder to see the essence of the code that should be properly factored, in a vicious cycle.