[fpc-devel] Re: [fpc-l] type discussion

Vinzent Hoefler JeLlyFish.software at gmx.net
Fri Jun 3 12:59:36 CEST 2005


On Thursday 02 June 2005 16:12, Marco van de Voort wrote:
> > > Begin..End is redundant - you have to indent them to make em
> > > readable anyways.
> >
> > No. This makes the code more readable like normal english text. It
> > states much more clearly what it intents, at least much more than
> > just indenting or putting curly braces around it.
>
> Not every syntax is about minimizing code or readability.

The latter it should.

> Some are
> also to simply simplify parsing (and that is about compiler
> developer, but to make the language more internally consistent) and
> avoid long lookaheads. These things combined also improve quality of
> error messages a lot.

Well, it is still named "begin", "end", not "x0x0x0" "0x0x0x", is 
it? ;-)

And for the compiler: it wouldn't make a difference if you'd parse 
"begin end" or "curly braces" tokens, would it?

> > > Maintenance is easier as their is less redundancy.
> >
> > It simply depends on the kind of redundancy.
> >
> > For instance, "type" and "var" keywords are just redundant, the
> > compiler could figure it out by itself, still they serve a useful
> > purpose.
>
> See above.

Yes, it might make the compiler writer's job easier. But typically you 
don't design a language around a compiler. And I strongly doubt that 
Wirth did.


Vinzent.

-- 
public key: http://www.t-domaingrabbing.ch/publickey.asc





More information about the fpc-devel mailing list