Have language researchers gotten it all wrong?

Nick Sabalausky a at a.a
Sun Jul 5 23:58:06 PDT 2009


"Daniel Keep" <daniel.keep.lists at gmail.com> wrote in message 
news:h2rssa$2q8k$1 at digitalmars.com...
>
> Walter Bright wrote:
>>
>> I tend to agree that dynamic languages work best for small projects. The
>> larger it is, the more advantages accrue to static type checking.
>>
>> The reality, though, is that programs most often start out as small
>> ones, and grow!
>
> I suspect that's why several dynamic languages are looking at, or are at
> least interested in, adding optional static types.
>
> That way, the code can be "locked down" as it grows.

Yea, I've noticed that. The problem with that approach though, is that for 
compatibility's sake, the "lock it down" features inevitably end up needing 
to take the approach of "off by default and then optionally enabled" which 
makes them too easy to accidentially side-step and defeats the point. It's 
better to go the other way around, and start with a language with 
locked-down stuff that can be optionally disabled for the sake of all the 
"nearsighted" coders.

What I mean by "nearsighted": Much of the arguments in favor of these 
"loose-and-dirty" dynamic features center around "It's quicker/easier for 
small programs!" What? For *small* programs? So what? Small programs are 
fucking easy regardless of which route you take. I'm supposed to care about 
the miniscule amount of time saved by ignoring types, declarations and such 
in a program of, what, a few hundred lines (ie about the only size for which 
I would argee it might actually be easier)? Maybe if it's something trivial 
and I know it'll remain trivial. But if there's any chance I'll want to 
expand it, I'm better off just writing it in a scalable language in the 
first place. Even if I misjudge and some of those small apps never end up 
expanding, I'm still better off overall for never having to switch languages 
midway or start over (which, while still perfectly doable for a small 
program, is still not nearly as simple as just doing the whole thing in the 
scalable language in the first place).

And of course, when I'm referring to static, locked-down, scalable languages 
here, I'm referring to something more like D, not like Java where it takes a 
million lines just to wipe your...umm...well...in any case, I'm talking 
about something sensible like D.





More information about the Digitalmars-d mailing list