Lambda (was: Refactoring in Tunes)

btanksley@hifn.com btanksley@hifn.com
Wed, 19 Jan 2000 21:50:44 -0800


> From: Laurent Martelli [mailto:martelli@iie.cnam.fr]
> Subject: Re: Lambda (was: Refactoring in Tunes)

>   >> OK. So annotations should be what they are : annotations. That
>   >> is, they should not be part of the program. They should be
>   >> add-ons. Some sort of other program (an aspect program ?).

>   billy> You could do that, but why?  The annotations are there to
>   billy> allow the compiler to make your life easier, not dramatically
>   billy> harder.  It's hard enough to add the annotations in the first
>   billy> place -- don't make it any harder.

>   billy> Also, the type annotations are intrinsically a part of the
>   billy> function they're annotating.  They have absolutely ZERO use
>   billy> outside of that function.

> My point is that those annotations are not needed to run the code, so
> a code evaluator should not be required to understand them. If
> annotations are included in the code, it's hard to commnicate your
> code to someone whose system does not understand annotations, or
> understands another type of anotations.

How many types of annotations do we need?  I'm only suggesting one -- type
annotations.  Very simple.  Easy to write.  If your system doesn't
understand them it's BROKEN.  If your system requires an annotation where I
don't have one it's also broken.

> Annotations are like a style sheet, it just allow *some* kind of
> reader to *better* manipulate some objects. There can be many
> different annotations : params type, params names ... That's what I'm
> trying to say in my paper on separation of concerns : if it's not
> needed, don't require it. 

But it's _not_ required unless it _is_ needed.  Have you ever used ML?
There, type annotations are often needed.  Yet it's always legal to use a
type annotation -- unless, of course, your function cannot possibly produce
that type.  In that case, you get an error, because you certainly made a
mistake.

> Anyway, all this does not prevent anyone to build a frontend that
> integrates annotations with the code itself. 

But that makes everyone's life SO much harder.  I don't understand why
you're suggesting it.

> Laurent Martelli

-Billy