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

Re: Lightness vs. Largeness



On Thu, 6 Dec 2001, Dan Weinreb wrote:
> Me too, but my current opinion is that the next time I write a
> 100,000-line application, I'm going to use type declarations
> everywhere I can, if the langauge makes them available (whether
> mandatory or optional).  I've really changed my mind on this over the
> years.  Partly it's because type declarations sometimes catch
> programming mistakes statically, and partly it's because they make
> programs easier to read.

Wouldn't you prefer to use a language that infers types.
Then you could use some documentation tool to generate a view of the code
that has type information.

More generally, a short summary of the discussion so far is:
Lightweight languages are optimized for writing.
Heavyweight languages are optimized for reading.

By reading, I mean verification, maintenance, integration into other
code, etc.

Heavyweight languages attempt to enforce as much documentation as possible
because programmers under deadline are already trying to achieve the
functionality they need and the cost of ex-post-facto documentation is too
high.

Scalable languages would therefore be languages that automatically
generate good documentation.  Examples may include:
* something that infers types and adds type comments to every function(1)
* something that generates dependency diagrams
* something that links functions to their unit tests.

(1) I could imagine a lightweight Java in which when you leave out type
declarations, some IDE automatically inserts them.

So the questions is: can we design lightweight languages in such a way
that IDEs can generate the documentation necessary for heavyweight tasks?

A related question is: is there a basic user interface problem in making
the language-you-read different from the language-you-write?

-Alex-

___________________________________________________________________
S. Alexander Jacobson			i2x Media
1-917-783-0889 voice			1-212-697-1427 fax