Re: [CLOS] Ensuring a method exists
- From: Ken Tilton <kentilton@xxxxxxxxx>
- Date: Thu, 28 Sep 2006 09:17:24 -0400
Simon Katz wrote:
On Thu, 28 Sep 2006 08:34:01 +0200, Pascal Costanza <pc@xxxxxxxxx>
wrote:
Ken Tilton wrote:
Pascal Costanza wrote:
Ken Tilton wrote:
Pascal Costanza wrote:
Both macros and the CLOS MOP are means to do metaprogramming. The distinction is that macros can be used for compile-time processing of code [1]
??? Hunh? I never use macros for compile-time pro... OK, once.
You _always_ use macros for compile-time processing of code.
Gee, that explains the runtime errors I get when I try to call macros then. <sigh>
I think this may be a non-native speaker thing. "use-for" does not mean what you think it means ("use-at"). I use macros for (to achieve) new syntax and to hide implementation.
Maybe. What I was trying to get at was that macros work at compile time
No sh*t, Einstein. Too bad that is not what you said (nice try, tho):
>>>>You _always_ use macros for compile-time processing of code.
Offered in contradiction to my:
>>>>>??? Hunh? I never use macros for compile-time pro... OK, once.
The once is ix-layer-expand, which takes keywords from a shorthand DSL for building up Cello panes from so many "layers" and generates code to be eval'ed at runtime and expands them into a lambda form. I guess like cl-who, tho my data arguments in the DSL evaluate at runtime.
This is OpenGL code which wants to be fast for (in order to get!) decent frame rates. The expansion of my mini-layering DSL into OpenGL calls can be done at compile time, so (read my lips, will ya?) /in this one case/ I use macros /for/ compile-time processing (interpretation of the DSL) instead of the usual purposes of syntax transformation and/or implementation-hiding.
and the CLOS MOP can be more convenient when meta-level stuff is required at run time.
<thump> <thump> Is this thing on?
FWIW, that was clear to this particular native speaker of English.
I wouldn't go around bragging about that.
Ken: "Cute puppy. Did you get it for companionship or to pick up chicks?"
Simon: "Hunh? My puppy /always/ gives me companionship."
hth, ken
--
Cells: http://common-lisp.net/project/cells/
"I'll say I'm losing my grip, and it feels terrific."
-- Smiling husband to scowling wife, New Yorker cartoon
.
- References:
- [CLOS] Ensuring a method exists
- From: Didier Verna
- Re: [CLOS] Ensuring a method exists
- From: Lars Rune Nøstdal
- Re: [CLOS] Ensuring a method exists
- From: Didier Verna
- Re: [CLOS] Ensuring a method exists
- From: Ken Tilton
- Re: [CLOS] Ensuring a method exists
- From: Christophe Rhodes
- Re: [CLOS] Ensuring a method exists
- From: Ken Tilton
- Re: [CLOS] Ensuring a method exists
- From: Pascal Costanza
- Re: [CLOS] Ensuring a method exists
- From: Ken Tilton
- Re: [CLOS] Ensuring a method exists
- From: Pascal Costanza
- Re: [CLOS] Ensuring a method exists
- From: Ken Tilton
- Re: [CLOS] Ensuring a method exists
- From: Pascal Costanza
- Re: [CLOS] Ensuring a method exists
- From: Simon Katz
- [CLOS] Ensuring a method exists
- Prev by Date: Re: All paths through a tree
- Next by Date: Re: Aha! moments
- Previous by thread: Re: [CLOS] Ensuring a method exists
- Next by thread: Re: Ensuring a method exists
- Index(es):
Relevant Pages
|