(j3.2006) Macro questions

Malcolm Cohen malcolm
Thu Feb 1 01:43:11 EST 2007


Well, here's my one macro email for the day.

With luck this discussion will continue and I won't have to think
about answering any of the other questions at all.

Aleksandar Donev said:
> On Tuesday 30 January 2007 20:03, Malcolm Cohen wrote:
> 
> > The "easy fix" for the feature is to have $quote, e.g.
> > ? INTEGER($quote KIND = kind) name
> > where $quote protects the next token against expansion,
> > i.e. it quotes it.
> Actually quoting a token *after* substitution and concatenation is useful

Well that's not quoting.  Read what I wrote.

> (for 
> example, in printing out messages), so it is better to have both $quote and 
> $unquote. And I would use parenthesis:
> 
> INTEGER($unquote("KIND") = kind) name

Gordon Bennet, is it too much for you to read and understand what
I write when I use terms everyone else in the C.S. community use?
I even wrote down what I meant for the benefit of people unfamiliar
with the term/concept, but you've ignored that too.

Stringifying is not Quoting!

And stringifying *would not have made any sense at all* for what I
was talking about.

> It would be useful if we can agree on using one of the unused special 
> characters for things macro (that don't make into real syntax). Aside from 
> $quote, examples include my "delimiters around macro actuals" [just use 
> "$(...)"], macro functions (like $unquote above).
> 
> Incidentally, FWEB uses $ for most macro syntax. So it is $IF, $DO, $QUOTE, 

Incidentally, as far as I can tell FWEB doesn't have $QUOTE,
though for stringifying it does have $STRING.  It has what one
might charitably term "other means of achieving the same effect",
viz writing what you want to protect as a string and then using
$UNQUOTE to strip the quotes off.  Purely a textual hack, and
yes I do mean akin to making furniture with an axe.

> $EVAL, etc. I kind of like that, though MACRO IF etc. is OK as well. BTW,
> the $EVAL is the equivalent of our macro assignment:

No it's not.  It does one of the things we do in some kinds of macro
assignment, but it's in no way equivalent.  (It doesn't do the assignment
for a start, it only does the "evaluation of the right-hand-side", as
its name implies.)

Cheers,
-- 
........................Malcolm Cohen (malcolm at nag-j.co.jp), Nihon NAG, Tokyo.



More information about the J3 mailing list