Making D better than other programming languages (warning: rant, drivel)
Sean Kelly
sean at f4.ca
Tue Oct 31 06:01:10 PST 2006
Don Clugston wrote:
> Dave wrote:
>>
>> So I'm wondering if, in the grand scheme of things, dynamic typing
>> really accounts for a 2.5x difference in productivity anyhow?
>
> I suspect it doesn't scale very well. (Like not requiring you declare
> variables -- looks great on a 10 or 20 line program, a complete disaster
> on anything bigger).
This is why I don't like Lua, and it was a huge source of bugs for me
there. Any typo resulted in a new variable being created instead of an
existing one being modified. But I do think that dynamic typing is
useful in the general case. Ruby, for example. If the object has the
methods being called then it doesn't matter what the underlying type is,
and if there is a mismatch (say, for expressions) then coercion is an
option. But even though Smalltalk works the same way (as far as I
know), I'm not sure how the concept scales or how it affects
provability. I'll admit I still like having the compiler catch as many
errors as possible, and in the extreme case, this form of type checking
seems like it could allow bizarre mistakes to be made and for them to be
extremely difficult to debug.
Sean
More information about the Digitalmars-d
mailing list