Related articles |
---|
Why put type information into syntax? across@vega.co.uk (Allister Cross) (2000-03-25) |
Re: Why put type information into syntax? lex@cc.gatech.edu (2000-03-28) |
Re: Re: Why put type information into syntax? srineet@email.com (Srineet) (2000-04-01) |
Re: Re: Why put type information into syntax? kst@cts.com (Keith Thompson) (2000-04-03) |
Re: Why put type information into syntax? rod.bates@wichita.boeing.com (Rodney M. Bates) (2000-04-05) |
From: | "Srineet" <srineet@email.com> |
Newsgroups: | comp.compilers |
Date: | 1 Apr 2000 14:04:07 -0500 |
Organization: | Compilers Central |
References: | 00-03-133 00-03-148 |
Keywords: | types |
Hi,
I think there is another reason for built in types. Some language
features rely on them, for example, in C the expression in an
if-statement / while-statement etc. must be coercable to int. Now, if
there was no built-in int type, what rule can you have for that? This
is even more relevant for languages with a builtin boolean type, where
the if-condition-expression must be boolean. So we see that some
builtin types not only make the gammar "easy to specify" but are in
fact necessary.
- Srineet.
----- Original Message -----
> > Does anyone know of any reasons why built-in type names should be
> > incorporated in the syntax of a language. ...
Return to the
comp.compilers page.
Search the
comp.compilers archives again.