[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Small time coding [Was: Re: About Visual Basic [Was: Industry versus academia]]

Michael Vanier wrote:
> Very nice discussion of VB.  I've often wondered why VB had such
> mindshare among certain groups of programmers.

A big and basic reason is that it was one of the first
languages/environments capable of producing credible Windows GUI
applications, without having to manually churn out pages of C code for the
simplest dialog.  It is still one of the stronger contenders in that area,
just focusing on the GUI interface aspect

On the language design side, one interesting technical point about VB is
that it has *optional* variable type annotations.  Prior to VB.NET at least,
typechecking was still dynamic, not static, but the optional annotations are
nevertheless a useful capability, which would be nice to have in some of the
other dynamically-typed languages.

In many ways, having optional type annotations in a dynamically-checked
language is an easy and useful compromise between static and dynamic typing.
And as Guillaume pointed out, it provides benefits for the tools.  The tools
can - and do, in VB's case - perform static type detection, even if the
compiler doesn't.

I think these optional type annotations are one example of a sort of
pragmatism that's often lacking in language designs.  It's a pretty low-cost
feature to include in a language.  A trivial precompiler could add it to
just about any dynamic language - basically, find every mutation of a
variable and insert a type assertion based on the variable's declaration.
But it seems that when people think type annotations, that leads them to
think static checking, and that leads straight to the usual static vs.
dynamic polarization.

Useful features don't get added because they're not considered perfect
enough?  We need language designers who're willing to be sloppier!  (Hmmm -
I reserve the right to rescind that request...)