From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Keller Newsgroups: gmane.emacs.help Subject: Re: What is the best way to navigate #ifdef and #endif in C program Date: Thu, 5 Aug 2010 21:10:48 +0000 (UTC) Organization: the UPL Message-ID: References: <53f62f81-fb10-4fb6-87ce-0eb5609d12f5@h17g2000pri.googlegroups.com> <87y6cmsmf1.fsf@kuiper.lan.informatimago.com> <57db02c5-32db-4483-863e-a9177e4e6003@w30g2000yqw.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1291948374 16810 80.91.229.12 (10 Dec 2010 02:32:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 02:32:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 10 03:32:50 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQsmv-0004TT-U0 for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Dec 2010 03:32:50 +0100 Original-Received: from localhost ([127.0.0.1]:38016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQsmv-0002XQ-7w for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 21:32:49 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed-0.progon.net!progon.net!news.qsc.de!newsfeed.kamp.net!newsfeed.kamp.net!eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.lang.lisp,comp.lang.scheme Original-Lines: 31 Injection-Date: Thu, 5 Aug 2010 21:10:48 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="ooL5dVz+AwTXWsVFxETc8w"; logging-data="17308"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lBPTSf994k/LeW51ZU819" User-Agent: tin/1.9.5-20091224 ("Lochruan") (UNIX) (Linux/2.6.32-24-generic (i686)) Cancel-Lock: sha1:XvGDFo5mN/WDU28YM9bxsA1N/U0= Original-Xref: usenet.stanford.edu gnu.emacs.help:180432 comp.lang.lisp:290962 comp.lang.scheme:87284 X-Mailman-Approved-At: Thu, 09 Dec 2010 20:23:31 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77207 Archived-At: In comp.lang.lisp Elena wrote: > On 4 Ago, 17:09, Peter Keller wrote: >> Specifically:http://letoverlambda.com/index.cl/guest/chap5.html#sec_4 >> >> Would show you how to write a macro such that it adds Scheme's tail call >> optimized "named let" into Common Lisp. ?This goes beyond the concept >> of syntactic sugar and enters the domain of pure code transformation. > > Indeed, code transformation is what sets CL's macros apart. However, > TCO is much more than that. Read here: > > http://stackoverflow.com/questions/2181852/tail-call-elimination-in-clojure After reading that, I assert that I don't know how to take base CL and make it tail recursive since redefining things like defun and whatnot lead to package lock errors. Even things like define-compiler-macro can't redefine any of the CL macros or functions. One probably could have success if they created forms like defun-tco, labels-tco, flet-tco, etc which kept track of their code expansions and rewrote them to be tco. But at that point you've implemented a tco enforced lisp dialect on top of CL. > However, TCO could also just not be possible in CL because of its > design: > > http://www.cliki.net/Tail%20Recursion It may be true, I don't know. -pete