3 ms·
Frank Atanassow's contention is that statically-typed languages are more expressive, and therefore superior because they can perform both static and dynamic typ
by rfugger 14y ago
Frank Atanassow's contention is that statically-typed languages are more expressive, and therefore superior because they can perform both static and dynamic type checking (he actually only uses the word "type" for something that can be statically checked; he uses "tag" for something carrying dynamic type information). Dynamic languages cannot perform static validation, and so are less expressive, and therefore strictly inferior.
His reasoning is sound, but I have an intuition as to why his conclusion is a bit off: Dynamic languages may be less expressive, but it can be much simpler to write, and especially modify, code without having to worry about two different sets of type semantics. Take the situation where you have a variable whose type was originally static, but now, because of a new requirement, needs to potentially take on values of different types determined at runtime. With a dynamic language, this probably isn't a major issue -- just assign the new values to the variable, and change the code to handle the new values where necessary. With a statically-typed language, you may have to redesign the entire static type structure of your program to change what were static "types" into dynamic "tags" and create new static types to handle those tags, which can mean major surgery.
Sure, a well-designed type structure is important even with a dynamic language, but in real life there are so many cases when it just isn't worth the time to refactor your whole design just to add a new feature. More than that, big refactorings can introduce bugs, and who honestly has 100% test coverage?
In a large enough project with a large enough budget, redesigning to maintain a proper static type structure is always going to be the better choice when viewed over a long enough time frame. As another commenter put it, statically-typed language are only "asymptotically superior". My sense is that, for finite projects/budgets/timeframes, ditching strict static typing is often a useful simplification, even if just to make a program easier to understand for busy programmers with finite available attention.
Just a thought that occurred while reading the comments -- I may not really know what I'm talking about.
- dasil003 14y ago"asymptotically superior" is exactly what my sense is as well. I've bookmarked the page for later reading as the discussion is far too huge to process in a single sitting.