Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!purdue!news.bu.edu!inmet!houdini!stt
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: OO, C++, and something much better!
X-Nntp-Posting-Host: houdini.camb.inmet.com
Message-ID: <E3LyA4.3FK.0.-s@inmet.camb.inmet.com>
Followup-To: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng
Sender: news@inmet.camb.inmet.com (USENET news)
Organization: Intermetrics, Inc.
X-Newsreader: TIN [version 1.1 PL8]
References: <5arhb0$d4e@top.mitre.org>
Date: Mon, 6 Jan 1997 22:25:15 GMT
Lines: 18
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:238548 comp.lang.smalltalk:48665 comp.lang.eiffel:17154 comp.lang.ada:55657 comp.object:59452 comp.software-eng:52203

Michael F Brenner (mfb@mbunix.mitre.org) wrote:

: Yes, there is some added flexibility in C++ templates over Ada generics,
: and vice versa too. The added flexibility in C++ templates comes from the
: ability to expand them at compile time without losing optimizations, unlike
: Ada generics whose paradigm is to expand at run-time and remove staticness
: from expressions. 

It is true that Ada considers some expressions inside a generic as
non-static, but that has no necessary effect on optimization.
Many non-static expressions are computed at compile-time.  There
are certain places where the language requires static expressions,
such as an expression in a case alternative, but compilers can and do
still evaluate expressions that are not "officially" static at
compile-time.

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Cambridge, MA  USA
