help-gnu-emacs
[Top][All Lists]
Advanced

[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: Elena
Subject: Re: What is the best way to navigate #ifdef and #endif in C program
Date: Wed, 08 Dec 2010 15:23:27 -0000
User-agent: G2/1.0

On Aug 6, 10:43 am, Pascal Costanza <p...@p-cos.net> wrote:
> Here is a way how to do TCO in Common 
> Lisp:http://groups.google.com/group/comp.lang.lisp/msg/8f9dcf58a00aca27
>
> It can't be implemented as just a macro, because it requires the
> cooperation of different parts of a program. You can only do that as a
> "real" language extension.

Thanks for the link, Pascal.

IMHO, that would be a better way to make TCO available, that is: TCO
should be explicit, since you know beforehand whether you want your
function to be tail recursive or not. Then, whenever you fail to
implement a tail recursion among mutually recursive functions, the
compiler should complain. If I'm not mistaken, OCaml has (somewhat)
explicit TCO. Or detecting such errors would better be left to test
cases?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]