Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion LISP - The Challenge of Nested Macros - [#V0.3]
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ilias  
View profile  
 More options Sep 12 2002, 4:52 pm
Newsgroups: comp.lang.lisp
From: ilias <at_n...@pontos.net>
Date: Fri, 13 Sep 2002 00:00:41 +0300
Local: Thurs, Sep 12 2002 5:00 pm
Subject: Re: LISP - The Challenge of Nested Macros - [#V0.3]
Joe Marshall wrote:
> ilias <at_n...@pontos.net> writes:

>>,',long is the same as ,long
> This is not true.

in context of macroexpansion: of course it is.

>>,' evaluates to 'nothing' so you can simply drop it.
> Nor is this.

of course it is.

>>  (defmacro abbrev (short long)
>>    `(defmacro ,short (&rest args)
>>      `(,long ,@args)))

>>looks easier now.
> Looks wrong now, too.

simply correct.

> (defmacro abbrev1 (short long)
>   `(defmacro ,short (&rest args)
>       `(,',long ,@args)))

> (defmacro abbrev2 (short long)
>   `(defmacro ,short (&rest args)
>      `(,long ,@args)))

> (abbrev1 nice-and-short horrendously-long)

> (macroexpand '(nice-and-short a b c)) => (horrendously-long a b c)

> (abbrev2 shorter even-more-horrendously-long)

> (macroexpand '(shorter a b c))
> ;; Error:  The variable LONG is unbound

oh.

macroexpand.

i'm a lisp-novice.

this function is new to me.

i'll use it.

btw: The LISP you use seems to be *not* conforming to the ANSI Standard.

Cause ANSI-Conforming Common Lisp must execute this code.

> I only mention this because there just *might* be newbies still
> reading these and I don't want them to become confused.

Have you broken an agreement? you sound like this.

Anyway.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.