A ->= operator, and possibly .=, which would make it easier to go through linked lists and other such structures with lots of pointers. Instead of writing
p = p -> next;
it can now be
p ->= next;
or, if you're working with binary trees, instead of
while(t && t->v != i)
if(t->v < i)
t = t -> l;
else
t = t -> r;
it becomes
while(t && t->v != i)
t ->= (t->v < i) ? l : r;
I'm working on a C-like compiler and I thought this would be a good idea.
I use macros within macros. It helps reduce clutter and can be manipulated easily. e.g.
#define MAXBUF 1000
#define NMAX MAXBUF*8
_________________________________________ http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
We've arranged a civilization in which most crucial elements profoundly depend on science and technology. We have also arranged things so that almost no one understands science and technology. This is a prescription for disaster. We might get away with it for awhile, but sooner or later this combustible mixture of ignorance and power is going to blow up in our faces.
>>42
I don't think it has to have parameters to be called a macro, dude. The throwing up and the confusion are normal reactions to prolonged FV exposure, though.
>>29
(princ
((lambda (x)
(concatenate 'string (multiple-value-call #'mapcan #'list (values-list x))))
'((#\H #\v #\ #\o #\ #\e #\d #\y #\u #\ #\i #\p #\t #\d #\y #\?)
(#\a #\e #\y #\u #\r #\a #\ #\o #\r #\s #\c #\ #\o #\a #\ #\newline))))
Made it more generic, m-v-c + values-list now let us have a variable list of arguments to mapcan/mapcar.
OT: m-v-c is how APPLY is actually implemented on some implementations, such a lovely special operator.