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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,571930b4ff0bc1ee X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-28 23:50:00 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!news.tele.dk!194.213.69.151!news.algonet.se!algonet!pepsi.tninet.se!not-for-mail From: Mats Karlssohn Newsgroups: comp.lang.ada Subject: Re: Compile time executed functions Date: Thu, 29 Mar 2001 09:41:05 +0200 Organization: MIDA Systemutveckling AB Message-ID: <3AC2E711.65914E47@mida.se> References: <3AC03CCE.70E3C2D5@mida.se> <3AC18DD1.EF25CE42@mida.se> NNTP-Posting-Host: sdu40-250.ppp.algonet.se Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: cubacola.tninet.se 985851681 19558 195.163.250.40 (29 Mar 2001 07:41:21 GMT) X-Complaints-To: abuse@algo.net NNTP-Posting-Date: 29 Mar 2001 07:41:21 GMT X-Mailer: Mozilla 4.6 [en] (WinNT; I) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:6191 Date: 2001-03-29T07:41:21+00:00 List-Id: Phaedrus wrote: > > "Mats Karlssohn" wrote in message > news:3AC18DD1.EF25CE42@mida.se... > > The other issue is that I feel that within Ada's expressive powers > > it would be useful to have _some_ of the possibilities that is > > availible when using C++ templates and/or C preprocessor macros. > > (Please, no flames on the two 'bad words' above!) > > I hope that this doesn't come off as a flame, but Ada always had > something like C++ templates, they are called generics. As for > preprocessor macros, well, that subject has been pretty adequately > covered in the "Implementing C/C++ style #include" thread. It doesn't, and of course I know of generics, I use them just about every day,. However, Ada generics is not as expressiv as C++ templates with regard to what you can get the compiler to execute for you at compile time. In many ways this is a blessing, that's why I'm thinking of executing almost arbitrary functions at compiletime. I think that implementing this (probably by adding a pragma) should be doable, and very useful. -- Mats Karlssohn, developer mailto:mats@mida.se Mida Systemutveckling AB http://www.mida.se Box 64, S-732 22 ARBOGA, SWEDEN Phone: +46-(0)589-89808 Fax: +46-(0)589-89809