[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is the best way to navigate #ifdef and #endif in C program
From: |
Peter Keller |
Subject: |
Re: What is the best way to navigate #ifdef and #endif in C program |
Date: |
Wed, 08 Dec 2010 15:23:19 -0000 |
User-agent: |
tin/1.9.5-20091224 ("Lochruan") (UNIX) (Linux/2.6.32-24-generic (i686)) |
In comp.lang.lisp Elena <egarrulo@gmail.com> wrote:
> On 4 Ago, 17:09, Peter Keller <psil...@cs.wisc.edu> 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
- What is the best way to navigate #ifdef and #endif in C program, Daniel (Youngwhan), 2010/12/08
- [OT] Re: What is the best way to navigate #ifdef and #endif in C program, Fren Zeee, 2010/12/08
- Re: [OT] Re: What is the best way to navigate #ifdef and #endif in C program, Pascal J. Bourguignon, 2010/12/08
- Re: What is the best way to navigate #ifdef and #endif in C program, Elena, 2010/12/08
- Re: What is the best way to navigate #ifdef and #endif in C program, Arzobispo Andante, 2010/12/09
- Re: What is the best way to navigate #ifdef and #endif in C program, Peter Keller, 2010/12/09
- Re: What is the best way to navigate #ifdef and #endif in C program, Elena, 2010/12/08
- Re: What is the best way to navigate #ifdef and #endif in C program, Elena, 2010/12/08
- Re: What is the best way to navigate #ifdef and #endif in C program,
Peter Keller <=
- Re: What is the best way to navigate #ifdef and #endif in C program, Pascal J. Bourguignon, 2010/12/08
- Re: What is the best way to navigate #ifdef and #endif in C program, Pascal Costanza, 2010/12/09
- Re: What is the best way to navigate #ifdef and #endif in C program, Elena, 2010/12/08
- Re: What is the best way to navigate #ifdef and #endif in C program, Pascal J. Bourguignon, 2010/12/08
- Re: What is the best way to navigate #ifdef and #endif in C program, Peter Keller, 2010/12/09
- Re: What is the best way to navigate #ifdef and #endif in C program, Alessio Stalla, 2010/12/09
- Re: What is the best way to navigate #ifdef and #endif in C program, Pascal J. Bourguignon, 2010/12/08
Re: What is the best way to navigate #ifdef and #endif in C program, Elena, 2010/12/08
Re: What is the best way to navigate #ifdef and #endif in C program, Elena, 2010/12/08
Re: [OT] Re: What is the best way to navigate #ifdef and #endif in C program, Aaron W . Hsu, 2010/12/09