From: Johan Ur Riise
Subject: why is there not (backquote ...)
Date: 
Message-ID: <87fy8chm1u.fsf@morr.riise-data.net>
Why is there not a backquote function or special form,
while threre is '...  == (quote ...)

From: John Thingstad
Subject: Re: why is there not (backquote ...)
Date: 
Message-ID: <op.tozuzqcfpqzri1@pandora.upc.no>
On Sat, 10 Mar 2007 21:37:49 +0100, Johan Ur Riise <·····@riise-data.no>  
wrote:

>
> Why is there not a backquote function or special form,
> while threre is '...  == (quote ...)

There is.. sort. of

(let (x)
   `(fun ,x))

means (let (x) (list 'fun x) or (let (x) (list (quote fun) x)) if you will.
So it is kinda the inverse of quote, every variable not superseded by , is  
quoted.
But of cource you could also do this explicitly.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: Barry Margolin
Subject: Re: why is there not (backquote ...)
Date: 
Message-ID: <barmar-5EBD8F.12145511032007@comcast.dca.giganews.com>
In article <··············@morr.riise-data.net>,
 Johan Ur Riise <·····@riise-data.no> wrote:

> Why is there not a backquote function or special form,
> while threre is '...  == (quote ...)

To allow implementations flexibility in how they expand backquote.  
Quote is so simple that there's no need for this, but backquote is 
complex enough that there are a number of different ways a particular 
expression could be expanded.

And when CL was being standardized there was already quite a bit of 
variation in backquote implementations.  Standardizing the expansion 
would have required just about every implementation to change, for 
little benefit.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: Tayssir John Gabbour
Subject: Re: why is there not (backquote ...)
Date: 
Message-ID: <1173643514.200756.143110@s48g2000cws.googlegroups.com>
Barry Margolin wrote:
> In article <··············@morr.riise-data.net>,
>  Johan Ur Riise <·····@riise-data.no> wrote:
> > Why is there not a backquote function or special form,
> > while threre is '...  == (quote ...)
>
> To allow implementations flexibility in how they expand backquote.
> Quote is so simple that there's no need for this, but backquote is
> complex enough that there are a number of different ways a particular
> expression could be expanded.
>
> And when CL was being standardized there was already quite a bit of
> variation in backquote implementations.  Standardizing the expansion
> would have required just about every implementation to change, for
> little benefit.

Searching for "backquote special operator" showed a lot of arguments
that this probably wasn't the best design, and Scheme may be better in
this regard.

Tayssir
From: Vassil Nikolov
Subject: Re: why is there not (backquote ...)
Date: 
Message-ID: <yy8vy7m3guv6.fsf@eskimo.com>
On 11 Mar 2007 13:05:14 -0700, "Tayssir John Gabbour" <············@googlemail.com> said:

| Barry Margolin wrote:
|| In article <··············@morr.riise-data.net>,
|| Johan Ur Riise <·····@riise-data.no> wrote:
|| > Why is there not a backquote function or special form,
|| > while threre is '...  == (quote ...)
|| 
|| To allow implementations flexibility in how they expand backquote.
|| Quote is so simple that there's no need for this, but backquote is
|| complex enough that there are a number of different ways a particular
|| expression could be expanded.
|| 
|| And when CL was being standardized there was already quite a bit of
|| variation in backquote implementations.  Standardizing the expansion
|| would have required just about every implementation to change, for
|| little benefit.

| Searching for "backquote special operator" showed a lot of arguments
| that this probably wasn't the best design, and Scheme may be better in
| this regard.

  Still, with regards to the way the original question drew a parallel
  between the backquote and the quote reader macros, it is worth noting
  that the necessity is at a different level: it is possible to
  implement the former without its special operator, albeit imperfectly,
  but not the latter, not without changing the language itself in a
  significant way.  (Perhaps at the cost of losing the "code is data"
  property.  Cf. the (algorithmic) language of M-expressions, which
  does not have (or need) a "quote" special operator.)

  ---Vassil.


-- 
Is your code free of side defects?
From: Kaz Kylheku
Subject: Re: why is there not (backquote ...)
Date: 
Message-ID: <1173649644.270546.62990@s48g2000cws.googlegroups.com>
On Mar 10, 12:37 pm, Johan Ur Riise <····@riise-data.no> wrote:
> Why is there not a backquote function or special form,
> while threre is '...  == (quote ...)

Because when Common Lisp was standarized, existing implementations did
not have such a thing, and each one implemented the read macro in its
own way: a situation which persists today.

Therefore, to introduce a BACKQUOTE operator would have meant
inventing this language feature and forcing everyone to implement it.

In the first round of standardizing a widely implemented existing
language, you generally want to codify existing features that are
common to the various implementations, rather than invent new things
that nobody has. There are exceptions to this principle, but backquote
didn't end up one of the exceptions.
From: Johan Ur Riise
Subject: Re: why is there not (backquote ...)
Date: 
Message-ID: <877itngwx2.fsf@morr.riise-data.net>
"Kaz Kylheku" <········@gmail.com> writes:

> On Mar 10, 12:37 pm, Johan Ur Riise <····@riise-data.no> wrote:
> > Why is there not a backquote function or special form,
> > while threre is '...  == (quote ...)
> 
> Because when Common Lisp was standarized, existing implementations did
> not have such a thing, and each one implemented the read macro in its
> own way: a situation which persists today.
> 
> Therefore, to introduce a BACKQUOTE operator would have meant
> inventing this language feature and forcing everyone to implement it.
> 
> In the first round of standardizing a widely implemented existing
> language, you generally want to codify existing features that are
> common to the various implementations, rather than invent new things
> that nobody has. There are exceptions to this principle, but backquote
> didn't end up one of the exceptions.

Thanks everybody, that is good enough for me.

I started creating a backquote macro just for fun,
(producing cones and quotes), but it became to complicated.
From: Rob Warnock
Subject: Re: why is there not (backquote ...)
Date: 
Message-ID: <fbCdncnIEOCFO2rYnZ2dnUVZ_uWlnZ2d@speakeasy.net>
Kaz Kylheku <········@gmail.com> wrote:
+---------------
| Johan Ur Riise <····@riise-data.no> wrote:
| > Why is there not a backquote function or special form,
| > while threre is '...  == (quote ...)
| 
| Because when Common Lisp was standarized, existing implementations did
| not have such a thing, and each one implemented the read macro in its
| own way: a situation which persists today.
| 
| Therefore, to introduce a BACKQUOTE operator would have meant
| inventing this language feature and forcing everyone to implement it.
| 
| In the first round of standardizing a widely implemented existing
| language, you generally want to codify existing features that are
| common to the various implementations, rather than invent new things
| that nobody has. There are exceptions to this principle, but backquote
| didn't end up one of the exceptions.
+---------------

Unfortunate, IMHO, since IIUIC by the time ANSI CL was gelling
Scheme already *had* standardized a convenient S-expr expansion
for each backquote-related readmacro:

    `form   ==> (backquote form)
    ,form   ==> (unquote form)
    ,@form  ==> (unquote-splicing form)

Unlike CL, in Scheme BACKQUOTE is *not* implemented in the reader,
which merely expands the readmacros into the corresponding S-expr
expansions. BACKQUOTE is instead [pnormally] evaluated by EVAL,
and is of course a special form that must do a tree-walk of its
FORM argument and "do the right thing" when it encounters a sublist
whose CAR is UNQUOTE or UNQUOTE-SPLICING. There is considerable
experience in the Scheme community with this mapping, including
allowing UNQUOTE or UNQUOTE-SPLICING readmacros to be included
in *other* special forms than just BACKQUOTE. ["Scsh" a.k.a. "The
Scheme Shell" depends upon this, but CL *forbids* it, which is why
transliterating "Scsh" to "CLsh"[1] involves inserting lots of
backticks at inconvenient places.]


-Rob

[1] No, I know of no fully-working "CLsh", only a few gedankenexperiments
    and/or.

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607