Related articles |
---|
Preferred order of evaluation fs29@rumpelkammer.uni-mannheim.de (Nils M. Holm) (1996-09-05) |
Re: Preferred order of evaluation leichter@smarts.com (Jerry Leichter) (1996-09-06) |
Re: Preferred order of evaluation dlmoore@ix.netcom.com (David L Moore) (1996-09-07) |
Re: Preferred order of evaluation ok@cs.rmit.edu.au (1996-09-15) |
Re: Preferred order of evaluation dmoen@mks.com (1996-09-15) |
Re: Preferred order of evaluation gbcacm@ccs.neu.edu (1996-09-15) |
From: | David L Moore <dlmoore@ix.netcom.com> |
Newsgroups: | comp.compilers |
Date: | 7 Sep 1996 09:44:30 -0400 |
Organization: | Netcom |
References: | 96-09-021 96-09-042 |
Keywords: | design |
Nils M. Holm wrote:
> Given a language without any operator precedence, would you prefer
How about neither - if you write an expression for which the
result depends upon evaluation order, the expression is ambiguous
and the compiler gives an error.
Of course, if I write a+b+c, the order should be that which
gives maximum accuracy! This has to be determined at runtime (in
general)
One can have some fun with each of these ideas. Idea 1 could lead to
questions about equivalence of values - perhaps the results differ only
in their types, and one type subsums the other.
Idea 2 leads to optimizing for numerical accuracy, rather than speed,
which I don't believe has ever been addressed by compiler writers (if it
has, I would love references).
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.