Re: [CLOS] Ensuring a method exists



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
and the CLOS MOP can be more convenient when meta-level stuff is
required at run time.


Pascal

FWIW, that was clear to this particular native speaker of English.
I think it would be clear to most.

Simon

___________________
Real email address:
(substitute #\@ #\+ (substitute #\s #\! "u!enet001+nomi!tech.com"))
.



Relevant Pages

  • Re: [CLOS] Ensuring a method exists
    ... I never use macros for compile-time pro... ... You _always_ use macros for compile-time processing of code. ... 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. ... The expansion of my mini-layering DSL into OpenGL calls can be done at compile time, so /in this one case/ I use macros /for/ compile-time processing instead of the usual purposes of syntax transformation and/or implementation-hiding. ...
    (comp.lang.lisp)
  • Re: [CLOS] Ensuring a method exists
    ... I never use macros for compile-time pro... ... You _always_ use macros for compile-time processing of code. ... The distinction is that macros can be used for compile-time processing of code, while the CLOS MOP is useful for meta-programs that require special actions at runtime. ... The expansion of my mini-layering DSL into OpenGL calls can be done at compile time, so /in this one case/ I use macros /for/ compile-time processing instead of the usual purposes of syntax transformation and/or implementation-hiding. ...
    (comp.lang.lisp)
  • Re: [CLOS] Ensuring a method exists
    ... Pascal Costanza wrote: ... CLOS as a convenient internal tool to the larger API, but then that is why I suggest going /further/ and hide the CLOS behind some macrology, at which point the OP can enforce anything they want really really easily. ... Both macros and the CLOS MOP are means to do metaprogramming. ... You _always_ use macros for compile-time processing of code. ...
    (comp.lang.lisp)
  • Re: [CLOS] Ensuring a method exists
    ... CLOS as a convenient internal tool to the larger API, but then that is why I suggest going /further/ and hide the CLOS behind some macrology, at which point the OP can enforce anything they want really really easily. ... Both macros and the CLOS MOP are means to do metaprogramming. ... You _always_ use macros for compile-time processing of code. ...
    (comp.lang.lisp)
  • Re: C++ Compiler with a -Wwarn-use-of-strcpy or similar option??
    ... macros to watch the string and memory routines and inform at ... similar macros used to track memory leaks and similar offenses ... The macro does compile time checking ... As a general rule you should compile with the maximum warning ...
    (comp.lang.cpp)