Re: A New Revealation: Semi-Permeable Membranes Mark S. Miller (markm@caplet.com)
Tue, 26 Oct 1999 10:55:53 -0700

At 07:43 AM 10/26/99 , Douglas Crockford wrote:
> > [#] If we're really talking about guards, then ":" only seems natural.
> >
> > define square(x : int) : int { x * x }
>
>I like this notation a lot.

Me too. If there is no further controversy, this seems to be our answer.

At first, I had a syntactic ambiguity conflict between this and another aspect of the grammar ("match" clauses), but I've resolved it. More later.

<nit>

E doesn't use "int" for integers for the same reason it doesn't use "=" for equality. C, C++, Java, and its ilk -- our legaC -- have ruined both. The legaC ruined "=" by using it for assignment, and ruined "int" by using it for signed arithmetic in a modular field. (I can understand unsigned arithmetic in a modular field, but signed modular arithmetic can only be justified by "We simply made the ALU accessible, but without the overflow bit. Yes, it's broken, but we're not going to fix it.")

So, instead, E uses "integer".

By the same token, legaC ruined "float" by defining it as single-precision floating point. E only provides the subset of IEEE double precision floating point provided by Java. However, the legaC type name "double" is just too stupid, so, as a compromise, E uses "float64".

</nit>

         Cheers,
         --MarkM