4 ms·
I disagree with your assertion that dynamic languages are easier to change. In my experience programs written in a typed language are much easier to change, bec
by dtech 8y ago
I disagree with your assertion that dynamic languages are easier to change. In my experience programs written in a typed language are much easier to change, because IDEs can exactly tell you how something interconnects (and thus where breaks might happen) and the compiler can give you some confidence that you didn't miss anything, or alternatively throw an error if you did miss something.
You can partially provide the same benefits in dynamic languages with tests, but at that point you're paying the same cost as with a type system.
- 0x445442 8y agoAgreed. In my experience, the cost of reasoning about a code base is much higher than the cost to type the code in an editor. And reasoning about a code base in a language like Java using an IDE like IntelliJ is much less costly than reasoning about a large code base in a language like Perl using VIM and the terminal.
- jondubois 8y agoStatically typed languages encourage bad programming practices precisely because they make it easier to track type references across many files. Ideally, types should not traverse too many files; there should be a clear class hierarchy and each level should provide more abstraction. Also it's better to encourage passing simple types like strings, numbers or clones of objects instead of active instances... Because if an instance of a class is referenced in many parts of the code, it's difficult to track which part of the code was responsible for changes made to that instance; also it's harder to maintain your train of thought when traversing many files to debug a simple operation related to a specific instance type. On a related note, I've noticed at multiple companies that when they force developers to use specific IDEs which make it easy to find stuff, the directory structure of the projects tends to suffer (since existing developers don't rely on the directory structure to find things; so they stop caring about it) - This makes it harder for newcomers to make sense of the code and makes the project totally dependent on the IDE.
- lalaithion 8y agoI feel like "each level should provide more abstraction" is at odds with "encourage passing simple types like strings, numbers". Also, I'd go further than "pass clones of objects instead of active instances" all the way to "only use mutable objects when performance demands it, and keep the scope of the mutability small".