Edit
Attach
Printable
topic end
<!-- * Set TOPICTITLE = #define private public - Claus Brod on stuff (01 May 2007) --> <style type="text/css"> pre {background-color:#ffeecc;} </style> %STARTINCLUDE% <a name="01"></a> ---+++ [[DefinePrivatePublic20070501]["Macro" considered harmful]] (01 May 2007) <summary> In the [[OneSpaceModeling.WebHome][<nop>OneSpace Modeling FAQ]] pages, I sometimes used or still use the term "macro" for the code snippets which I present there. Not a wise choice, as it occurred to me a while ago, and I intend to fix that now, or at least over time as I revisit those pages for other updates. </summary> I used "macro" mostly for historical reasons. "Macro" is an overloaded term which can mean (too) many things: * In Lisp, a macro is a piece of code defined by [[http://www.lisp.org/HyperSpec/Body/mac_defmacro.html][defmacro]]. Macros in Lisp are a clever way to extend the language. If you want to learn more about this (or about Common Lisp in general, in fact), I recommend Peter Seibel's "Practical Common Lisp" - here's [[http://www.gigamonkeys.com/book/macros-defining-your-own.html][the section on macros]]. * <nop>CoCreate's 2D package, <nop>OneSpace Drafting, has a built-in macro interpreter which can be used to customize and extend the product. Since many <nop>OneSpace Drafting migrate from 2D to 3D, i.e. to <nop>OneSpace Modeling, they tend to take their nomenclature with them, and so they often call pieces of Lisp customization code a "macro", too. * In many software packages, users can record the interaction with the product and save the result into files, which are then often called macro files. <nop>OneSpace Modeling's recorder is such a mechanism, and so using the word "macro" is kind of natural for many users. And so many users of <nop>OneSpace Modeling call their Lisp functions and customizations "macros", although this isn't really the correct term. Well, at least in most cases. Many of those customizations use an API called =sd-defdialog= which is provided by the "Integration Kit" library which ships with <nop>OneSpace Modeling. This API is, in fact, implemented using =defmacro=, i.e. =sd-defdialog= is itself a Lisp macro. So if a user writes code which builds on =sd-defdialog= and then calls the result a macro, he's actually not _that_ far from the truth - although, of course, still incorrect. --- %STOPINCLUDE% %COMMENT{type="below" nonotify="on"}% ---
to top
End of topic
Skip to action links
|
Back to top
Edit
|
Attach image or document
|
Printable version
|
Raw text
|
Refresh
|
More topic actions
Revisions: | r1.5 |
>
|
r1.4
|
>
|
r1.3
|
Total page history
|
Backlinks
You are here:
Blog
>
DefinePrivatePublic20070501
r1.5 - 19 Sep 2007 - 21:58 -
ClausBrod
to top
Blog
This site
2017
:
12
-
11
-
10
2016
:
10
-
7
-
3
2015
:
11
-
10
-
9
-
4
-
1
2014
:
5
2013
:
9
-
8
-
7
-
6
-
5
2012
:
2
-
10
2011
:
1
-
8
-
9
-
10
-
12
2010
:
11
-
10
-
9
-
4
2009
:
11
-
9
-
8
-
7
-
6
-
5
-
4
-
3
2008
:
5
-
4
-
3
-
1
2007:
12
-
8
-
7
-
6
-
5
-
4
-
3
-
1
2006:
4
-
3
-
2
-
1
2005:
12
-
6
-
5
-
4
2004:
12
-
11
-
10
C++
CoCreate Modeling
COM & .NET
Java
Mac
Lisp
OpenSource
Scripting
Windows
Stuff
Changes
Index
Search
Maintenance
Impressum
Datenschutzerklärung
Home
Webs
Atari
Blog
Claus
CoCreateModeling
Klassentreffen
Main
Sandbox
Sommelier
TWiki
Xplm
Jump:
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback