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 Question: macros and lambdas
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
 
Jacek Podkanski  
View profile  
 More options Sep 28 2002, 10:13 pm
Newsgroups: comp.lang.lisp
From: Jacek Podkanski <jacekpodkan...@supanet.com>
Date: Sun, 29 Sep 2002 03:11:15 +0100
Local: Sat, Sep 28 2002 10:11 pm
Subject: Re: Question: macros and lambdas

Gareth McCaughan wrote:
> Jacek Podkanski wrote:

>> > | Somewhere I seen information that everything that can be done with
>> > | macros
>> > | can be done with lambdas.  Is this correct?

>> >   It is an arbitrary statement devoid of contents and meaning, so
>> >   therefore neither correct nor incorrect.

>> I thought that someone would know anyway. Someone replied to me:
>> "the whole point of macros is that they let you do things that *cannot*
>> be done with functions". I think he is right, please correct me if I'm
>> wrong.

> 1. Anything you can do with macros, you can do with functions.

>    For instance, with functions you can write your own Lisp
>    interpreter or compiler which implements macros, and then
>    use that.

>    For instance, a lot of the things you do with macros could
>    instead be done (at the cost of repeated code and syntactic
>    inconvenience) by packaging up the lumps of code that the
>    macro would work on inside closures and feeding those to
>    ordinary functions.

> 2. Macros are for doing things that can't be done with functions.

>    For instance, extending the syntax of your language without
>    having to reimplement the whole thing.

>    For instance, expressing operations that manipulate lumps of
>    code without needing lots of syntactic noise.

> I suspect that whoever told you "everything that can be done
> with macros can be done with lambdas" meant the second of
> the for-instances under #1 above, in which case "everything"
> goes way too far: macros can do things that go way beyond
> just deciding which arguments to evaluate when. In other
> words, with the meaning I think they intended, the statement
> is wrong. But it's hard to be sure because there's so much
> ambiguity in it.

> The people who've said you won't really understand what's
> going on here without diving in and learning some more
> are probably correct, by the way.

I agree with you.
--
Jacek Podkanski

 
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.