Newsgroups: | comp.compilers |
From: | jan@neuroinformatik.ruhr-uni-bochum.de (Jan Vorbrueggen) |
Keywords: | C++, optimize |
Organization: | Institut fuer Neuroinformatik, Ruhr-Universitaet Bochum, Germany |
References: | 95-07-068 95-08-115 |
Date: | Mon, 21 Aug 1995 15:59:25 GMT |
bobduff@world.std.com (Robert A Duff) writes:
Unfortunately, there are still some "stylistic" rules left -- for example,
it's still illegal for a function to have an 'out' parameter, which is very
annoying.
Wow. Even occam2, which is "holier-than-thou" for almost anybody, allows
that. (Actually, a function can return any _list_ of scalar values, due to the
multiple assignment possible. Now, people also want to return fixed-size
arrays...)
I wonder if it's possible to design the language so that the compiler has a
better idea of exactly which sub-expressions have side-effects, and what
those side effects are. (Ada and C++ pretty much require the compiler to
assume the worst, for a call to a separately compiled function.)
Occam2 allows this, as any function _must_ be side-effect free. This is
checked by the compiler (only IN arguments, results as above, no I/O
statements allowed, no procedure calls). Thus, an occam2 compiler can assume
the best.
Jan
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.