[PRL] values and expressions
Richard Cobbe
cobbe at ccs.neu.edu
Sun Oct 23 09:24:30 EDT 2005
On Sun, Oct 23, 2005 at 12:16:20AM -0400, Dave Herman wrote:
> Is it a really bad thing not to have the values of a language be a
> subset of the expressions?
I'd think that depends on the context.
>From the (operational) semanticist's perspective, if your values aren't
also expressions, then you need to define a whole new set of type rules
to handle pseudo-expressions---that is, expression ASTs that have values
at the leaves rather than expressions. Otherwise, subject reduction
won't work; you won't even be able to state the theorem.
>From the perspective of desigining the language that the programmers
will actually use, it's hard to say. I'd personally be annoyed with a
language in which values were not expressions, because it would feel
like an artificial distinction for no real reason that would possibly
get in the way of writing the kind of code that I like to write. How
serious a problem this would actually be, though, would depend heavily
on circumstances. In some applications, I might grumble about it, but
be able to write the program anyway with only minimal additional effort.
Richard
More information about the PRL
mailing list