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-29 00:22:06 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.icl.net!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 10:18:14 +0200 Organization: MIDA Systemutveckling AB Message-ID: <3AC2EFC6.A0EFEA48@mida.se> References: <3AC03CCE.70E3C2D5@mida.se> <87ae67qdrv.fsf@deneb.enyo.de> <87lmprow3a.fsf@deneb.enyo.de> <874rweoo2p.fsf@deneb.enyo.de> 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 985853910 24695 195.163.250.40 (29 Mar 2001 08:18:30 GMT) X-Complaints-To: abuse@algo.net NNTP-Posting-Date: 29 Mar 2001 08:18:30 GMT X-Mailer: Mozilla 4.6 [en] (WinNT; I) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:6196 Date: 2001-03-29T08:18:30+00:00 List-Id: Robert A Duff wrote: > > Ted Dennison writes: > > > After thinking about this some more, I'll go so far as to say that I don't think > > there are *any* languages that supply this capability. > > That's not correct. The Bliss language has a macro facility that can > use the full power of the language at compile time. Lisp macros also > allow the full power of Lisp at compile time. Ahh, yet another reason to investigate Bliss (I've intended to do so for a while for historical reasons). In Lisp I fell that most of the time it's quite hard to se the difference between the interpreter and the compiler, but let's not start on that... [Cut away some points about the nonterminating functions that we already processed in other posts] > Come to think of it, can't you write infinite loops using the C macro > preprocessor? Eg, a file that #include's itself? Or a macro that > expands to something containing a call to itself? Yes, most C preprocessors limits the depth of the include stack to smething reasonabel like 16. Btw. recursive #include is the only way to do loops in the C preprocessor. -- 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