3 ms·
Is that really a fair comparison? The dynamically typed language is also typed, probably a longint. Had the C++ example used long then these examples would be a
by xorcist 3y ago
Is that really a fair comparison? The dynamically typed language is also typed, probably a longint. Had the C++ example used long then these examples would be at least bug compatible.
If we're discussing weakly typed languages then this argument is more valid, but that opens up to a new class of bugs strong dynamically typed languages don't have.
Anyone who says the conclusion is obvious have probably not thought this through.
- ReflectedImage 3y agoNo the dynamically typed language is not typed, the variable grows in size indefinitely to fit the number. Dynamically typed languages are more powerful languages that can handle problems like this correctly.
- xorcist 3y agoThat's not something inherent to dynamic typing. If we take a specific language such as Python, that specific behaviour has changed between versions. Much too often, any discussion of typing systems often boils down to specific traits around someone's favourite language. These specifics are obviously important enough to warrant a lot of skepticism around too general conclusions from studies. Bascially we're all recounting anecdotes, so let's be honest about that. I don't doubt yours, I just don't think they necessarily reflect fundamental truths about programming.