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: Peter Keller
Subject: Re: What is the best way to navigate #ifdef and #endif in C program
Date: Wed, 08 Dec 2010 15:22:52 -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 Aug 4, 10:27?am, p...@informatimago.com (Pascal J. Bourguignon)
> wrote:
>> This is the reason why there is no point asking whether there is a
>> feature X in CL. ?You can always add any feature to the language,
>> thanks to its macros or reader macros, and metalinguistic abilities in
>> general.
> 
> Can macros really add features or can they just add syntactic sugar? A
> custom "case" statement is just syntactic sugar, tail call
> optimization is a feature.

This book:

http://letoverlambda.com/index.cl/toc

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.

So yes, you can add features.

However, I don't know if you can add "any" feature to CL. :)

For example, could I add the ability for a function to introspect
into its own display and see an annotated mapping of the machine
registers in context? Or could I ask a piece of memory how many times
it has been moved in a generational garbage collector and where was
its last physical location?

Of course, I could add these things, but not with CL as it exists
today since there is no means to get that information outside of
implementation specific APIs which extend the meaning and domain of CL.

Later,
-pete




reply via email to

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