From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f51e93dacd9c7fca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-19 09:39:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!uunet!dca.uu.net!nyc.uu.net!ash.uu.net!spool0902.news.uu.net!not-for-mail Message-ID: <3D10B40F.2060201@mail.com> Date: Wed, 19 Jun 2002 12:40:47 -0400 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: status of Ada STL? References: <3d0ce154_5@news.bluewin.ch> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Cache-Post-Path: master.nyc.kbcfp.com!unknown@mosquito.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1024504797 8954 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:26395 Date: 2002-06-19T12:40:47-04:00 List-Id: Russ wrote: > The short answer is no. It cannot be done by the compiler. (If you > don't believe me, go ahead and chase your tail for a while.) However, > it could be done by a specialized pre-processor. There was talk of > adding something like that to C++ a while back, just so that people > could write more elegant code, such as > > A = B + C > > and have it automatically converted to the less attractive but more > efficient form > > A = B > A += C > > I don't know if it ever went anywhere, but it does show that C++ > programmers are well aware of these issues. Not only has it gone somewhere, it went there on steroids. And it's all doable using existing C++ (albeit to its full extent), so it doesn't require language changes. See . Check out while you're at it. Automatic template instanciation and partial specialization of templates form an incredibly useful and powerful tool. (It's actually Turing-complete!) It's my favorite aspect of C++.