From: Zach Beane
Subject: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <m3tz2uh5ur.fsf@unnamed.xach.com>
I came across approximately this statement yesterday:

  Lisp-2 programmers avoid using the same names for functions and
  variables.

That didn't sound right to me. I use Common Lisp, and I couldn't come up
with any personal examples of avoiding that practice. I also couldn't
remember actively thinking about the issue at all; I just use whatever
variable names seem natural.

Then I tried to think of examples when I did use variables with the same
name as a function: I often use the variable name list, and I often have
variables with the same name as a slot accessor (I don't use the foo-of
convention). But it hasn't been an active, conscious decision when
writing, and it doesn't jump out at me when re-reading as some kind of
clash.

So my survey question is this: Are you are a Lisp-2 programmer, and do
you avoid using the same names for functions and variables? 

Zach

[I also posed this question in my blog, but I'm sure there are a lot of
Common Lisp programmers here in comp.lang.lisp who did not see
it. If you saw it there and responded, thank you. If you didn't, you can
see the responses here: http://xach.livejournal.com/220107.html ]

From: Alessio Stalla
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <1e7ba328-82c6-4799-ae99-8281237beffd@u10g2000vbd.googlegroups.com>
On Jun 5, 8:51 pm, Zach Beane <····@xach.com> wrote:
> I came across approximately this statement yesterday:
>
>   Lisp-2 programmers avoid using the same names for functions and
>   variables.
>
> That didn't sound right to me. I use Common Lisp, and I couldn't come up
> with any personal examples of avoiding that practice. I also couldn't
> remember actively thinking about the issue at all; I just use whatever
> variable names seem natural.
>
> Then I tried to think of examples when I did use variables with the same
> name as a function: I often use the variable name list, and I often have
> variables with the same name as a slot accessor (I don't use the foo-of
> convention). But it hasn't been an active, conscious decision when
> writing, and it doesn't jump out at me when re-reading as some kind of
> clash.
>
> So my survey question is this: Are you are a Lisp-2 programmer, and do
> you avoid using the same names for functions and variables?
>
> Zach
>
> [I also posed this question in my blog, but I'm sure there are a lot of
> Common Lisp programmers here in comp.lang.lisp who did not see
> it. If you saw it there and responded, thank you. If you didn't, you can
> see the responses here:http://xach.livejournal.com/220107.html]

I believe that most of the time function names and variable names tend
to be naturally different. There are exceptions like those you
mentioned, but at least in my case they're rare. However, I don't put
conscious effort in keeping them different.

In fact, the mere existence of the possibility of a collision between
a function name and a variable name in Lisp-1 is what makes me fond of
Lisp-2 (in the presence of unhygienic macros ;).

Alessio
From: Thomas A. Russ
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <ymiljo64gux.fsf@blackcat.isi.edu>
Zach Beane <····@xach.com> writes:

> So my survey question is this: Are you are a Lisp-2 programmer, and do
> you avoid using the same names for functions and variables? 

I use Lisp-2 and do not avoid using the same names for functions and
variables.

(The most frequent one is list, but there are others common ones like
max and min as well.)


-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Kaz Kylheku
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <20090617121553.575@gmail.com>
On 2009-06-05, Thomas A. Russ <···@sevak.isi.edu> wrote:
> Zach Beane <····@xach.com> writes:
>
>> So my survey question is this: Are you are a Lisp-2 programmer, and do
>> you avoid using the same names for functions and variables? 
>
> I use Lisp-2 and do not avoid using the same names for functions and
> variables.
>
> (The most frequent one is list, but there are others common ones like
> max and min as well.)

I use C which is a non-lisp-1, having the same namespace for functions and
objects. 

In C, I do not avoid local variable names that might also be the names of some
API function somewhere.

 {
   size_t read = fread(buf, 1, sizeof buf, file);
   ...

 }

Sure, read is the name of a POSIX function, and we might even have
<fcntl.h> included which declares it. So what? We aren't calling that function
(not directly, nor through the expansions of any macros).

Why would I start such avoiding in Common Lisp? :)
From: Kaz Kylheku
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <20090617122623.598@gmail.com>
On 2009-06-05, Kaz Kylheku <········@gmail.com> wrote:
> Sure, read is the name of a POSIX function, and we might even have
><fcntl.h> included which declares it. So what? We aren't calling that function

s/fcntl/unistd/
From: Scott Burson
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <801dbb4e-3139-42ec-8f81-47667b5635eb@q2g2000vbr.googlegroups.com>
On Jun 5, 11:51 am, Zach Beane <····@xach.com> wrote:
> So my survey question is this: Are you are a Lisp-2 programmer, and do
> you avoid using the same names for functions and variables?

Yes, and no.  How often I actually use the same names I don't know,
but my guess is that Kenny is right.

Slightly OT, but the restrictions in sec. 11.1.2.1.2 of the spec
strike me as unfortunate.  In particular, I don't see why I should be
prevented from defining a local function with the same name as a CL
function, using `flet' or `labels'.  Oh well.

-- Scott
From: Thomas A. Russ
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <ymihbyu43tz.fsf@blackcat.isi.edu>
Scott Burson <········@gmail.com> writes:

> Slightly OT, but the restrictions in sec. 11.1.2.1.2 of the spec
> strike me as unfortunate.  In particular, I don't see why I should be
> prevented from defining a local function with the same name as a CL
> function, using `flet' or `labels'.  Oh well.

In addition to the other comments, this is also a pragmatic choice to
make the job of the compiler-writer easier.

Since you aren't allowed to redefine any of the built-in CL functions,
the compiler can compile any calls to such functions without needing to
figure out if they have their normal definitions or not.

So IF, CAR, CONS, etc. can just be compiled efficiently on sight,
without the need to do a deeper analysis to see if the definitions
associated with those symbols really are the built-in ones.

So unlike the use of non-portable extensions to the code, doing
something that is undefined in the standard could cause unexpected
results.  The most common one would be that the redefinition wouldn't
really do anything....


-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Rupert Swarbrick
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <h0c5eg$ap8$1@news.eternal-september.org>
--=-=-=

Scott Burson <········@gmail.com> writes:

> Slightly OT, but the restrictions in sec. 11.1.2.1.2 of the spec
> strike me as unfortunate.  In particular, I don't see why I should be
> prevented from defining a local function with the same name as a CL
> function, using `flet' or `labels'.  Oh well.

On a pragmatic note, it makes syntax highlighting a lot less
hit-and-miss. Of course, I presume that tools like slime would still get
it right (since they can talk to a lisp instance).

Rupert

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iJwEAQECAAYFAkopmQ0ACgkQRtd/pJbYVobkiwP/Ui8mpUPBnaL1KW8fztSSSnIj
ntjqt+J/HieL4FPyy+H9M+xKvuxaOSGqNqjMZrJyeKoxj3YCxtLh2xujY94JASjk
pbO+LFgpMdA0z7zENESBEkMDTt5CI/xuJWaIjyzdbx8F+v5ujugifka3KouOBhX4
3kSvt2RezrGwX5HUJc4=
=htMk
-----END PGP SIGNATURE-----
--=-=-=--
From: Kaz Kylheku
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <20090617143711.986@gmail.com>
On 2009-06-05, Scott Burson <········@gmail.com> wrote:
> On Jun 5, 11:51 am, Zach Beane <····@xach.com> wrote:
>> So my survey question is this: Are you are a Lisp-2 programmer, and do
>> you avoid using the same names for functions and variables?
>
> Yes, and no.  How often I actually use the same names I don't know,
> but my guess is that Kenny is right.
>
> Slightly OT, but the restrictions in sec. 11.1.2.1.2 of the spec
> strike me as unfortunate.  In particular, I don't see why I should be
> prevented from defining a local function with the same name as a CL
> function, using `flet' or `labels'.  Oh well.

You are not prevented from doing this; merely, the consequences are undefined.
I.e. you are no longer writing an ANSI CL program when you do that.  But real
code breaks ANSI CL compliance all the time anyway; any time you use the MOP,
some FFI, or other extensions.  Like when you use these things, you may still
be able find some other assurances that your hack of redefining a function will
work.

Because it's undefined, Lisp implementors do not have to ensure that standard
macros are hygienic. That is to say, standard Lisp macros can naively generate
expanded code which calls standard functions by name, under the assumption that
there isn't any interference.  The backquote syntax can write code like (APPEND
(LIST* ... (CONS ...))), without caring that you may have subverted these
functions somehow. LOOP can naively use SETQ and GO. Et cetera.

Because macros can write naive code, this makes debugging nicer.  When you
macroexpand something in the REPL, and it's naively implemented without
worrying about hygiene in the function namespace, you get familiar code, rather
than something which is chock full of private functions and operators.

More importantly, when you're writing your own macros, you don't have to bother
about function hygiene, even if you distribute your macros to other Lisp
programmers. Just write normal Lisp code in the expanded template.
If your macro breaks on someone because redefined a standard Lisp function,
ANSI CL is on your side.
From: Scott Burson
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <0978ae11-e4c9-4924-8f6e-a3275d868c35@s12g2000yqi.googlegroups.com>
On Jun 5, 4:45 pm, Kaz Kylheku <········@gmail.com> wrote:
> On 2009-06-05, Scott Burson <········@gmail.com> wrote:
>
> > On Jun 5, 11:51 am, Zach Beane <····@xach.com> wrote:
> >> So my survey question is this: Are you are a Lisp-2 programmer, and do
> >> you avoid using the same names for functions and variables?
>
> > Yes, and no.  How often I actually use the same names I don't know,
> > but my guess is that Kenny is right.
>
> > Slightly OT, but the restrictions in sec. 11.1.2.1.2 of the spec
> > strike me as unfortunate.  In particular, I don't see why I should be
> > prevented from defining a local function with the same name as a CL
> > function, using `flet' or `labels'.  Oh well.
>
> You are not prevented from doing this; merely, the consequences are undefined.

Well, some implementations issue an error and refuse to compile the
code.

> Because it's undefined, Lisp implementors do not have to ensure that standard
> macros are hygienic.

This is a good point.

I suppose that for any particular name I want to reuse, I can shadow
it in my package and provide a macro or inline definition that expands
to a call to the CL builtin.  Then I can rebind it with impunity.

Of course this makes me wonder -- just thinking out loud here --
whether this could be done automatically or proactively.  Naah, not
worth the trouble...

-- Scott
From: Pascal Costanza
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <78urh8F1mj2lrU3@mid.individual.net>
Scott Burson wrote:
> I suppose that for any particular name I want to reuse, I can shadow
> it in my package and provide a macro or inline definition that expands
> to a call to the CL builtin.  Then I can rebind it with impunity.
> 
> Of course this makes me wonder -- just thinking out loud here --
> whether this could be done automatically or proactively.  Naah, not
> worth the trouble...

Yes, it's possible. I have done it. ;)

See my ELS'09 paper "Hygiene for the Unhygienic".

Pascal

-- 
ELS'09: http://www.european-lisp-symposium.org/
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
From: Scott Burson
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <5de8920e-72fc-44ce-ad65-3deb18f9a29b@n4g2000vba.googlegroups.com>
On Jun 6, 2:34 am, Pascal Costanza <····@p-cos.net> wrote:
> See my ELS'09 paper "Hygiene for the Unhygienic".

I poked around a little, but didn't see the paper on the Web
anywhere.  Is it available yet?

-- Scott
From: Pascal Costanza
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <78vv1nF1nqh4tU1@mid.individual.net>
Scott Burson wrote:
> On Jun 6, 2:34 am, Pascal Costanza <····@p-cos.net> wrote:
>> See my ELS'09 paper "Hygiene for the Unhygienic".
> 
> I poked around a little, but didn't see the paper on the Web
> anywhere.  Is it available yet?

Ah, sorry, no. Not yet.

I will upload it some of these days. If you (or anybody else) want to 
read it sooner, drop me an email.


Pascal

-- 
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
From: Pascal Costanza
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <791uqdF1p0s4sU1@mid.individual.net>
Pascal Costanza wrote:
> Scott Burson wrote:
>> On Jun 6, 2:34 am, Pascal Costanza <····@p-cos.net> wrote:
>>> See my ELS'09 paper "Hygiene for the Unhygienic".
>>
>> I poked around a little, but didn't see the paper on the Web
>> anywhere.  Is it available yet?
> 
> Ah, sorry, no. Not yet.
> 
> I will upload it some of these days. If you (or anybody else) want to 
> read it sooner, drop me an email.

It's available now at http://p-cos.net/documents/hygiene.pdf


Pascal

-- 
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
From: Raffael Cavallaro
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <h0gj0c$v93$2@news.eternal-september.org>
On 2009-06-07 09:49:01 -0400, Pascal Costanza <··@p-cos.net> said:

> It's available now at http://p-cos.net/documents/hygiene.pdf
> 
> 
> Pascal

Thanks for this Pascal - very interesting read.
-- 
Raffael Cavallaro
From: Scott Burson
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <18176e95-59dd-44d8-82f2-0a2bfa9bf51b@g20g2000vba.googlegroups.com>
On Jun 7, 7:31 am, Raffael Cavallaro
<················@pas.espam.s.il.vous.plait.mac.com> wrote:
> On 2009-06-07 09:49:01 -0400, Pascal Costanza <····@p-cos.net> said:
>
> > It's available now athttp://p-cos.net/documents/hygiene.pdf
>
> Thanks for this Pascal - very interesting read.

Yes, thanks!

-- Scott
From: Pascal Costanza
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <78ur7rF1mj2lrU1@mid.individual.net>
Scott Burson wrote:
> On Jun 5, 11:51 am, Zach Beane <····@xach.com> wrote:
>> So my survey question is this: Are you are a Lisp-2 programmer, and do
>> you avoid using the same names for functions and variables?
> 
> Yes, and no.  How often I actually use the same names I don't know,
> but my guess is that Kenny is right.
> 
> Slightly OT, but the restrictions in sec. 11.1.2.1.2 of the spec
> strike me as unfortunate.  In particular, I don't see why I should be
> prevented from defining a local function with the same name as a CL
> function, using `flet' or `labels'.  Oh well.

Because of predefined macros that want to rely on the predefined 
meanings of predefined functions.

There was an attempt to specify these things in more detail, as you can 
tell from the discussion of the with-open-file macro in the HyperSpec, 
which explicitly states that it uses open and close to do its job - 
specifying such details could be useful because you could then 
_intentionally_ redefine such functions and be _sure_ that the 
corresponding macros use your version. However, it seems it became too 
hairy to do this (which I can easily imagine).

Some of the restrictions in that section are indeed a bit too strict, 
but I guess they opted for being a bit too cautious here...


Pascal

-- 
ELS'09: http://www.european-lisp-symposium.org/
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
From: ······@nhplace.com
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <45050565-db59-477e-9cb0-f18d35c3a653@e24g2000vbe.googlegroups.com>
On Jun 5, 5:43 pm, Scott Burson <········@gmail.com> wrote:
> Slightly OT, but the restrictions in sec. 11.1.2.1.2 of the spec
> strike me as unfortunate.  In particular, I don't see why I should be
> prevented from defining a local function with the same name as a CL
> function, using `flet' or `labels'.  Oh well.

The short answer is that the restriction is too light, not too heavy.
The real restriction should be that you can't do this for any package
you did not personally author [e.g., write the defpackage form for
yourself].  If you don't infer at least that strong a restriction
from, say, a proper application of the Prisoner's Dilemma style
reasoning to this situation, you will find that CL needs macro
hygiene.  Having this restriction, plus the common-sense restriction
that you shouldn't redefine other people's functions at toplevel
either, really means it doesn't.
From: Barry Margolin
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <barmar-9F7E52.00041007062009@mara100-84.onlink.net>
In article 
<····································@q2g2000vbr.googlegroups.com>,
 Scott Burson <········@gmail.com> wrote:

> Slightly OT, but the restrictions in sec. 11.1.2.1.2 of the spec
> strike me as unfortunate.  In particular, I don't see why I should be
> prevented from defining a local function with the same name as a CL
> function, using `flet' or `labels'.  Oh well.

There's a good reason for this.  Suppose you use a macro within the body 
of that FLET or LABELS, and its expansion uses the function that you 
locally redefined.  The author of the macro needs to know that these 
functions will do what he expects.

If CL had hygienic macros this wouldn't be a problem, since the macro 
would continue to refer to the global functions.

-- 
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: Kenneth Tilton
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <4a297677$0$5918$607ed4bc@cv.net>
Zach Beane wrote:
> So my survey question is this: Are you are a Lisp-2 programmer, and do
> you avoid using the same names for functions and variables? 

yes, no, and I do not think one realizes how many clashes would bite you 
if CL were a Lisp-1 but I found out fast with even just a small amount 
of experimentation with Arc.

kt
From: Adlai
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <7d9ea4d7-70c5-4aa9-8956-443d6fd649ca@j12g2000vbl.googlegroups.com>
On Jun 5, 9:51 pm, Zach Beane <····@xach.com> wrote:
> So my survey question is this: Are you are a Lisp-2 programmer, and do
> you avoid using the same names for functions and variables?

(I also posted on your blog, so if you're doing any sort of statistics
on answers to this, count me once only)

I use overlapping names quite often. It happens all the time in
English (and other languages) -- why shouldn't it happen in a computer
language? Context plays a major role in inter-human communication, and
I think it makes only easier to interact with a computer if we let
context in there as well.

Overloaded symbols often appearing in my code:
list, array, char, string -- for obvious reasons
min, max
car, cdr -- usually within the scope of a
  (let ((car (car x))
        (cdr (cdr x)))
    (code-that-repeatedly-references car)
    (some-other-code-that-references cdr)
    (etc))
sqrt -- mainly for the same reason as car and cdr above: if I'm using
a value several times, I'd rather just reference the value than bloat
my code with yet another function call.

Also, it's great for obfuscating code. I've never had a need to
obfuscate my code, but even when I do it just for fun, Common Lisp
makes obfuscation that much easier :)

Adlai
From: ········@gmail.com
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <b1423d43-2c3a-4886-9107-942cb21e7545@z14g2000yqa.googlegroups.com>
On 5 Giu, 20:51, Zach Beane <····@xach.com> wrote:
> [1-or-2 of Lisp]

If I have 1 dictator dictating everything, I have all the errors
inside his mind.

If I have 99 experts expertising, I have most of common errors/flaws/
drawbacks already eliminated.

The 1st one is more similar to Lisp-1, the second one (sorry, don't
remember how to finish..)

-PM
From: Pillsy
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <b3522ad3-b383-4f41-850c-25be87724b99@q14g2000vbn.googlegroups.com>
On Jun 5, 2:51 pm, Zach Beane <····@xach.com> wrote:
[...]
> So my survey question is this: Are you are a Lisp-2 programmer, and do
> you avoid using the same names for functions and variables?

I've never avoided it. I remember seeing a lot of code when I started
learning Lisp that contained things like (DEFUN FROB-LIST (LIST) ...)
so it never really occurred to me to do otherwise. The most common
ones I use are FIRST, REST, LIST and VECTOR.

Cheers,
Pillsy
From: Kaz Kylheku
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <20090617120550.348@gmail.com>
On 2009-06-05, Zach Beane <····@xach.com> wrote:
> I came across approximately this statement yesterday:
>
>   Lisp-2 programmers avoid using the same names for functions and
>   variables.

I don't even think that Lisp-1 programmers avoid using the same names
for functions and variables.

Lisp programmers do not avoid using the same names for different variables (in
different scopes, clearly). Functions are variables in a Lisp-1. 

Ergo ...
From: John Thingstad
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <op.uu2mbxiwut4oq5@pandora>
På Fri, 05 Jun 2009 20:51:08 +0200, skrev Zach Beane <····@xach.com>:

> I came across approximately this statement yesterday:
>
>   Lisp-2 programmers avoid using the same names for functions and
>   variables.
>
> That didn't sound right to me. I use Common Lisp, and I couldn't come up
> with any personal examples of avoiding that practice. I also couldn't
> remember actively thinking about the issue at all; I just use whatever
> variable names seem natural.
>
> Then I tried to think of examples when I did use variables with the same
> name as a function: I often use the variable name list, and I often have
> variables with the same name as a slot accessor (I don't use the foo-of
> convention). But it hasn't been an active, conscious decision when
> writing, and it doesn't jump out at me when re-reading as some kind of
> clash.
>
> So my survey question is this: Are you are a Lisp-2 programmer, and do
> you avoid using the same names for functions and variables?
>
> Zach
>
> [I also posed this question in my blog, but I'm sure there are a lot of
> Common Lisp programmers here in comp.lang.lisp who did not see
> it. If you saw it there and responded, thank you. If you didn't, you can
> see the responses here: http://xach.livejournal.com/220107.html ]

No, I use list, array etc without prejudice. Still most of the time it  
doesn't make much difference as functions tend to be verbs and variables  
subjects.

-- 
---------------------
John Thingstad
From: Xah Lee
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <4c8f16bd-a23d-4a8c-b4f6-d683aab74322@q16g2000yqg.googlegroups.com>
On Jun 5, 11:51 am, Zach Beane <····@xach.com> wrote:
> I came across approximately this statement yesterday:
>
>   Lisp-2 programmers avoid using the same names for functions and
>   variables.
>
> ...

• Why You should Not Use The Jargon Lisp1 and Lisp2
  http://xahlee.org/emacs/lisp1_vs_lisp2.html

plain text version follows.
--------------------------------------------------

Why You should Not Use The Jargon Lisp1 and Lisp2

Xah Lee, 2008-01-10

Someone (·········@gmx.net) wrote:

    Having read Touretzky's introduction and the first half of Paul
    Graham's On Lisp, I'm wondering what the advantages of a Lisp-2
    are over a Lisp-1

    It seems to me that a Lisp-2's ability to use a single symbol to
    represent both a function and a value is a minor advantage,
    although I'm sure some regard it as a disadvantage. On the other
    hand, a Lisp-2 requires the clunky, IMHO, #' operator and cannot
    have a elegant, universal DEFINE like Scheme's.

    Yet I've heard that a Lisp-1's macros are necessarily less
    powerful than those of a Lisp-2. Is that true? Are there some
    other big advantages of a Lisp-2 that I'm missing?

Please try to avoid the jargons lisp1 and lisp2.

Recently i have just wrote a longish essay on the harm of jargons in
functional languages. The jargon lisp1 and lisp2 is one of better
example that illustrate the issue.

• The jargon is opaque. The words do not convey its meaning.

• Being a opaque jargon, it is often used subconsciously by people in
a group, to communicate that they are in-group. (a class-
differentiation strategy of human animals; as is much of slang's
purpose) And consequently, these jargons are thrown about often
without the writers actually understanding, or wishing to discuss
about it in any way.

Further, this issue is relatively minor, having little real-world
practical impact. It is not unlike a war about which end of egg one
should crack. (i.e. big endian vs little endian; See: Gulliver's
Travels. PART I — A VOYAGE TO LILLIPUT, Chapter 4)

Why is this issue minor? Consider it broadly in human animal's
computing activities. I give 2 examples:

Consider that in the 1960 people went to moon. (Moon landing) Imagine
what complexities involved in the physics, mathematics, computation,
at a time when computer are some one thousand times slower than today,
using punch-cards, and there are not much of computer languages, not
even modular programing.

For another example, consider today's PHP language. Linguistically, it
is one of the most badly designed language, with many inconsistencies,
WITH NO NAMESPACE MECHANISM, yet, it is so widely used that it is in
fact one of the top 5 most deployed languages. If one of PHP or lisps
and all associated applications written in them is to suddenly
disappear from the face of this earth as a catastrophic punishment
from Zeus, and all the leaders of nations is to have experts to assess
the damage as they do with natural disasters, it is probable that PHP
would be a order of magnitude greater loss.

Now, suppose we narrow the scope of “lisp1 vs lisp2” to its context:
computer language design. There are many issues in language design.
For example: dynamic scope vs lexical variable scope, various models
of typing systems (dynamic, static, variable/value based, algebraic
types, no types, with or without inference system), computing paradigm
(OOP, Functional, procedural, pattern matching, database), evaluation
model (greedy vs lazy) ... etc. Among all language design issues, the
“lisp1” vs “lisp2” is really one of the least significant, which
actually arise practically only in Lisp due to its peculiar concept of
its “symbols”.

The existence of a name to a concept or idea, especially a opaque
jargon, tends to get people to throw the name and argue about it
unnecessarily.

To people in the lisp communities, please stop using the term. If
necessary, say Common Lisp's model or Scheme Lisp's model, or, use a
communicative term like multi-meaning-space and single-meaning-space.

------------------------------
The “Why” of “multi-meaning-space”

Now, in the following, i wish to discuss some associated issue. In
particular, thoughts on how multi-meaning-space came about.

There's a curious question. Why is the “lisp1 vs lisp2” happens only
in lisp, and we don't have “perl1 vs perl2”, “java1 vs java2”, “ML1 vs
ML2”, or any language with a variation on this?

This has to do with the concept of lisp's symbol, which doesn't exist
in other languages (notably except Mathematica).

Now, a further question is then, why Common Lisp's symbol of a
particular name can have multiple meanings? (That is, a name in CL can
both be a variable and a function in the same block of code at the
same time. (This peculiar fact, we might give it a professional
terminology for ease of communication, and we might call it: Common
Lisp's multi-meaning-space, or just multi-meaning-space, meaning-
space.))

Now, the question is, why do Lisps before Common Lisp have this multi-
meaning-space feature?

I do not know much about the technical aspects of Lisp's history.
However, i can venture a educated guess.

Old Lisps's multi-meaning-space feature, just like so many of its
features (the cons cell for lists, the function “sort” being
destructive, and semi-regular syntax using nested parens, etc), is
simply designed as is without necessarily explicit, important,
rationales. In other words, it is probably a characteristic that
happens to be convenient, easy to implement, or not thought about at
the time, or simply went one way than the other. (as opposed to,
prominent issues that calls for conscious, explicit, decisions with
important ramifications, such as syntax (sexp), symbols system,
evaluation model, ...etc.)

Now, as i mentioned before, this (single/multi)-meaning-space issue,
with respect to human animal's computing activities, or with respect
to the set of computer design decisions, is one of the trivial, having
almost no practical impact. And, because some human animals, in the
history of their power struggle, is produced the byproduct of the
jargons “lisp1” and “lisp2”. And due to the fact that which end of egg
to crack is now blessed with a terminology that has all the
countenance of impartiality, it furnishes and fuels countless
arguments and fightings on this non-issue between the Scheme Lisp and
Common Lisp factions, even when the origin of the power struggle on
this particular issue (the Common Lisp Standard) has long died. (more
specifically, every few months the issue will rise up in
comp.lang.lisp or comp.lang.scheme, with all colors and types of
activities from sincere to trite to re-examination to political
struggle to pacification.)

Note: for the technical details of the Common Lisp's meaning-space,
and the origin of the jargons “lisp1” and “lisp2”, see: Technical
Issues of Separation in Function Cells and Value Cells, by Richard P
Gabriel, Kent M Pitman, 1988.

------------------------------
FAQ, and The Meaning Of Name Space

Xah Lee, 2008-10

Q: The terms “Lisp-1” and “Lisp-2” were invented to expressly *avoid*
mentioning Common Lisp or Scheme, therefore we shouldn't use the terms
such as Common Lisp model or Scheme model to describe it.

The creation of these terms is in a context of a political struggle.
Namely, in creating the Common Lisp standard, Kent Pitmant has
tirelessly and repeatedly pointed out in the past decade here.

As i mentioned in the article, the political context for the birth of
lisp1/lisp2 is over, about 2 decades ago.

Except when discussing history, there's no need to stick with the
jargon lisp1 and lisp2.

If fact, i argued, if not for so much of the colorful jargon “lisp1/
lisp2”, the issue wouldn't even be much noticeable as it is relatively
unimportant. Common Lisp today is multi-meaning-space, and Scheme Lisp
is single-meaning-space. That's just a language fact and there's not
much one can do or want to do much about that in practice.

Also, another point Kent has mentioned is that people in the community
naturally picked up these terms. Actually, in my opinion, the
popularity and continued use of these terms has much to do with Kent's
promotion. In the past decade in “comp.lang.lisp”, he constantly
reminds people of his article, and even explicitly requests others to
use the terms Lisp1 and Lisp2, as opposed to other terms people used
when discussing this issue, such as “Common Lisp way” or “Scheme way”.

Q: Lisp does not use the term “name space” differently from other
languages. The meaning is the same, only the implementation details
are different.

Namespace are the spaces for names. For example, you might have a
variable/subroutine/function/class named “CreateSound”, but this could
be just defined in your file, or it could be imported from a package/
module/library, or another package/module/library could also have such
a entity called “CreateSound”. This is when the name space concept
came from. For those curious, the “space” part of the terminology came
from mathematics, e.g. vector space, topological space. It effectively
means a “set”. The reason that “space” and “set” are often synonymous
is due to the study of geometry, because a space is a set of points.

The name space concept is tightly connected with the language's
library/package/module system. In emacs lisp, PHP, and Scheme Lisp,
for examples, these languages actually do not have a name space
mechanism, so that you have to create unique names for every function
or variable you write. (Note: PHP v5.3 (2008-10) and Scheme R6RS
(2007-08) both introduced name space mechanism but isn't in common use
yet) In most other langs (e.g. Perl, Python, Mathematica), there are
name space mechanisms, so that you could call a function in some
library using full path, or that you could call that function without
full path by “importing” the function's name into your current file's
name space.

However, having a name space system still does not solve the problem
of unique naming. That is, someone could write a library named Sound
with a function named CreateSound, but someone else could also have
written a library and function of exactly the same name. So, when 2
programs use CreateSound, even though their source code may be
identical, they might behave very differently. (this is a problem for
example in emacs, where lots of people have written a module named xyz-
mode (e.g. Javascript-mode), competing for the same name xyz-mode, or
else using creative and less intuitive names to avoid name conflicts
(e.g. javascript, js, js2 modes, xml vs nxml, html vs html-helper,
perl vs cperl, ... etc.))

Java solved the uniqueness problem by adopting the domain name system
for library names, as a convention. So, if Joe writes a package, by
convention he should name his package something like “com.joe-
bloke.sound”. This domain name system has been adapted in few other
language systems too (e.g. XML namespace).

With regards to lisp, in emacs lisp for example, the lack of name
space is a major problem, and is also a major problem of Scheme Lisp
( Scheme Lisp spec 6 tried to fix this problem but not without huge
controversy of the design). And as far as i understand from hearsay of
gossips here, it is also a major problem for Common Lisp.

The above is a brief introduction on the concept of name space as it
is used, and some of its issues.

Now, the jargon lisp1 and lisp2 refers to a concept entirely different
from name space. It has to do with what lisp calls a symbol's
“function cell” or “value cell” (note: as is given by Kent's article
title “Technical Issues of Separation in Function Cells and Value
Cells”). What these function cell and value cell basically means the
value of lisp language's var/function/subroutine/class. (Note: var/
function/subroutine/class are typically called a “name” in computer
languages but in lisp is called “symbol”.) The “function cell” and
“value cell” is effectively a “meaning space” (or “value space”).

  Xah
∑ http://xahlee.org/

☄
From: ······@nhplace.com
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <e9566519-f201-49fe-ac11-a6859f120e89@t10g2000vbg.googlegroups.com>
On Jun 6, 4:28 am, Xah Lee <······@gmail.com> wrote:

> Why You should Not Use The Jargon Lisp1 and Lisp2

Xah, I agree with you on a number of your points but not on your lead-
in.  You could build your case better if you didn't go after this.

There's no real harm done by these terms and your campaign to get rid
of them loses audience for you because it seems both mean-spirited and
pointless.  I wish you would spend more time paying attention to the
reasons people do and don't resonate to your ideas because it would
get you further in the places where you have something to say.

> • The jargon is opaque. The words do not convey its meaning.

All jargon is opaque if you stare at it too closely.  Most words mean
what they mean just because we are told what they mean.  The terms
Lisp1 and Lisp2, which I created, are not widely used because I
published a manifesto for their use, they are widely used because they
seemed to name a concept that had no name and they made it possible to
talk succinctly about something that people wanted to talk about a
lot.

Even if you succeeded in getting generic terms "multi-meaning space"
or something, the problem is that language naturally seeks to shorten
words that are used a lot, and after a short time you'd hear it called
multimspa or something and perhaps later just multims and so on.
Lisp1 and Lisp2 have the virtue of being only two syllables and this
is as important or moreso than the quality of opacity.

> • Being a opaque jargon, it is often used subconsciously by people in
> a group, to communicate that they are in-group.

This is probably a useful criticism in a few cases but I don't think
dominant.  The sad truth is that even if a person who had no idea
about the concept heard a discussion on this, they'd probably still
have to ask questions to learn the detailed meaning of the
discussion.  The foreign-ness of the terms actually invite that
conversation because no one should feel ashamed not to know an
acronym, but if the terms are very generic, one might think it showed
lack of creativity or language knowledge and might not ask.  So it
could work just the opposite of what you say.

> For another example, consider today's PHP language. Linguistically, it
> is one of the most badly designed language, with many inconsistencies,
> WITH NO NAMESPACE MECHANISM, ...> Now, suppose we narrow the scope of
> “lisp1 vs lisp2” to its context: ...

If what you're gettng to is that people need words like PHP1 and PHP2
in order to discuss these others and wouldn't if there were a more
generic term, then this criticism is valid.  However, it is pointless
and bossy to suggest other people need to use a different term in
order for you to have a good term here.  Invent and promote your own
better term and just try to get people to use it (affirmatively);
don't try to stop them from using the other term. People are more
receptive to positive promotion than negative in some situations.

> Xah Lee, 2008-10
>
> Q: The terms “Lisp-1” and “Lisp-2” were invented to expressly *avoid*
> mentioning Common Lisp or Scheme, therefore we shouldn't use the terms
> such as Common Lisp model or Scheme model to describe it.

> Also, another point Kent has mentioned is that people in the community
> naturally picked up these terms. Actually, in my opinion, the
> popularity and continued use of these terms has much to do with Kent's
> promotion.

I was as surprised as anyone to see people using them outside the
context of my paper. It would never have occurred to me to promote
them originally.  However, the issue comes up a lot and I do find it
helpful.  I don't think that you can really say, though, that I spend
my days at some campaign headquarters strategizing a promotion.  And
if your criticism comes down to the idea that I should never involve
myself in a discussion on the matter using terms I created for the
express purpose of that discussion, that seems a bit restrictive.

If any of your ideas ever stick, even multi-meanin-space, which I will
not begrudge you if you can get people to use it, you're not going to
want to be accused of it succeeding merely because you promoted it.

> In the past decade in “comp.lang.lisp”, he constantly
> reminds people of his article, and even explicitly requests others to
> use the terms Lisp1 and Lisp2, as opposed to other terms people used
> when discussing this issue, such as “Common Lisp way” or “Scheme way”.

The reason the term was invented was because Scheme seems to claim a
lock on aesthetics, claiming CL has none. I disagree with that, but it
creates a "warm fuzzy" feeling in the heart of people that biases
their opinions on specifics.  The extreme case of this was that once I
was in an ISLISP meeting with someone (I'll decline to embarrass that
person by saying who--it doesn't really matter) and I asked that a
particular definition be taken from CL to ISLISP.  No, they said,
because it came from CL and would make ISLISP big and bloated like
CL.  No, I said, it would make ISLISP only changed by adding this one
remark.  But they said no merely because of the source.  I've seen
less extreme cases of that, but my point is that it does happen that
people stop listening when you talk CL (and others stop listening when
you talk Scheme) so it's easier to be neutral and Lisp1 and Lisp2 are
not the official canonical unique only way to be neutral, they're just
possible ways of being. I promote them because they're handy.

This is one of those things like CAR/CDR where I don't really like
those names either. They're not evocative.  But no better names have
been advanced that have the uses CAR/CDR does e.g., for composing
CADDR etc.  The names LHS/RHS come very close because LRRLHS is
conceivable.  But it isn't as pronounceable even in English and is
even less pronounceable for people who have difficulty in an
international community who come from languages that blur the L and R
sound.  So I accept criticism for CAR/CDR but still use them.  That's
kind of how I use LISP1/LISP2.

Another argument you don't raise is the confusion with Lisp 1 (early
Lisp version, predating Lisp 1.5) and confusion with 1LISP, 2LISP, and
3LISP (Brian Smith's dialectal variants building up to a proper
reflective tower).  I wish more people knew of Brian Smith's work
because it's cool, but since they don't, that name collision isn't
very important either.

You further don't seem to treat the fact that CL is really a Lisp4 (at
least) and so the name LISP2 is a problem in that regard.  There is
also a term I created in subsequent discussion which is Lisp-Omega,
that talks about a Lisp with arbitrary user-definable namespaces.
There is no implemented Lisp-Omega, but there could be.  Still the
distinction between finite-dimension and infinite-dimension is
critical because the formal semantics people tell me that a Lisp-Omega
would have a much smaller formal semantics than a Lisp2 or LispN for
any finite N > 1.

You have also blurred the distinction between modules and packages.
They could co-reside and are not conceptually in conflict.  Lisp
packages are not modules and so some of the remarks you make in regard
to that make no sense to me.  Packages are a syntactic-token-
resolution-time notion and Modules are a lexical analysis time tool.
To some extent, packages assure a unique name across designers/code-
writers, not across programmatic elements.  Modules are more concerned
with some other division among code.  The concepts are more akin to
the temporal division between read-time, macro expansion time, etc.
Treating read-time and macro-expansion time in a blurry fashion as if
they were the same thing, as some languages do, omits the opportunity
to give texture and names and semantics to both concepts.  So, too,
blurring packages and modules.

I hope my remarks are seen as constructive and non-defensive, Xah.  A
lot of people seem to rush to my defense when you post, but I'm not
really bothered by posts such as this, which are constructively worded
and seem to have a fair amount of interesting points to be made.  I
marked your post 4 stars in Google to acknowledge that this was an
above-average post by you and in the form I'd like to see more of.  I
do disagree with you on some technical matters, but then we live in a
plural society and there's no reason my opinion even has to be right.

Mostly I thought it of interest that I don't 100% disagree with you.
There is in fact some overlap of opinion, we just don't agree on
everything.
From: Xah Lee
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <0db5e5bf-f3fe-4b68-b22a-8a3c6e8619d4@f19g2000yqo.googlegroups.com>
2009-06-07

Dear Kent,

I'll reply freely and non-systimatically to some of your points. Just
to be sure, this is newsgroup, what i say here is not meant to be some
formal conference on humanity's problems, and that applies to you too,
despite your more careful and polite and voluable writing style.

i started to have composed some 500 words tot-for-tat style to your
reply, to be sure, free of politensess and great, but to cut the
chase ... just move on!

lisp1 vs lisp2 is not good. It's old shit. Forever getting people to
live in the old days of your lisp vs my lisp fight, in fact, not much
different from fights among today's major lang groups.

i don't see Common Lisp or Scheme Lisp ever will see the light of the
day again. If there's any hope, that'd be New Lisp and Clojure. Even
these, in today's one thousand and one hot functional langs the likes
of Ocmal, f#, Mathematica, Haskell, erlang, Oz... lisp's user base is
not likely to grow. I'd like to think emacs lisp, with its sizable
user base, might have a glint of hope, but not while the Richard
Stallman old hat still running the show, with a gaggle of his new
apostles and apprentices. I'd be thankful if emacs does not languish
too much in the coming years.

• Will Lisp Ever Be Popular?
  http://xahlee.org/UnixResource_dir/writ/lisp_be_popular.html

• Proliferation of Computing Languages
  http://xahlee.org/UnixResource_dir/writ/new_langs.html

lisp1 vs lisp2 are warts. The lisp community has lots of warts, such
as macros differences, and tail recursion fuck, small vs big, loop vs
recursion, of fucking no practical matter. It is like a ritual. Every
new lisper have to discuss these issues at some point, input their
colors into the mix, as if the word elegance depends on it.

Sure, you go on and write your elaborate writes and jolt youngster's
attention to history. I'll go on with my campaign on the beauty of Xah
Lee and importance of terminology. No hard feelings. At least, the
those who code in Common Lisp, appreciate the technicalities in your
writings.

• The Importance of Terminology's Quality In Computer Languages
  http://xahlee.org/UnixResource_dir/writ/naming_functions.html

  Xah
∑ http://xahlee.org/

☄



2009-06-07

On Jun 6, 7:47 pm, ······@nhplace.com wrote:
On Jun 6, 4:28 am, Xah Lee <······@gmail.com> wrote:

> Why You should Not Use The Jargon Lisp1 and Lisp2

Xah, I agree with you on a number of your points but not on your lead-
in.  You could build your case better if you didn't go after this.

There's no real harm done by these terms and your campaign to get rid
of them loses audience for you because it seems both mean-spirited and
pointless.  I wish you would spend more time paying attention to the
reasons people do and don't resonate to your ideas because it would
get you further in the places where you have something to say.

> • The jargon is opaque. The words do not convey its meaning.

All jargon is opaque if you stare at it too closely.  Most words mean
what they mean just because we are told what they mean.  The terms
Lisp1 and Lisp2, which I created, are not widely used because I
published a manifesto for their use, they are widely used because they
seemed to name a concept that had no name and they made it possible to
talk succinctly about something that people wanted to talk about a
lot.

Even if you succeeded in getting generic terms "multi-meaning space"
or something, the problem is that language naturally seeks to shorten
words that are used a lot, and after a short time you'd hear it called
multimspa or something and perhaps later just multims and so on.
Lisp1 and Lisp2 have the virtue of being only two syllables and this
is as important or moreso than the quality of opacity.

> • Being a opaque jargon, it is often used subconsciously by people in
> a group, to communicate that they are in-group.

This is probably a useful criticism in a few cases but I don't think
dominant.  The sad truth is that even if a person who had no idea
about the concept heard a discussion on this, they'd probably still
have to ask questions to learn the detailed meaning of the
discussion.  The foreign-ness of the terms actually invite that
conversation because no one should feel ashamed not to know an
acronym, but if the terms are very generic, one might think it showed
lack of creativity or language knowledge and might not ask.  So it
could work just the opposite of what you say.

> For another example, consider today's PHP language. Linguistically, it
> is one of the most badly designed language, with many inconsistencies,
> WITH NO NAMESPACE MECHANISM, ...> Now, suppose we narrow the scope of
> “lisp1 vs lisp2” to its context: ...

If what you're gettng to is that people need words like PHP1 and PHP2
in order to discuss these others and wouldn't if there were a more
generic term, then this criticism is valid.  However, it is pointless
and bossy to suggest other people need to use a different term in
order for you to have a good term here.  Invent and promote your own
better term and just try to get people to use it (affirmatively);
don't try to stop them from using the other term. People are more
receptive to positive promotion than negative in some situations.

> Xah Lee, 2008-10

> Q: The terms “Lisp-1” and “Lisp-2” were invented to expressly *avoid*
> mentioning Common Lisp or Scheme, therefore we shouldn't use the terms
> such as Common Lisp model or Scheme model to describe it.
> Also, another point Kent has mentioned is that people in the community
> naturally picked up these terms. Actually, in my opinion, the
> popularity and continued use of these terms has much to do with Kent's
> promotion.

I was as surprised as anyone to see people using them outside the
context of my paper. It would never have occurred to me to promote
them originally.  However, the issue comes up a lot and I do find it
helpful.  I don't think that you can really say, though, that I spend
my days at some campaign headquarters strategizing a promotion.  And
if your criticism comes down to the idea that I should never involve
myself in a discussion on the matter using terms I created for the
express purpose of that discussion, that seems a bit restrictive.

If any of your ideas ever stick, even multi-meanin-space, which I will
not begrudge you if you can get people to use it, you're not going to
want to be accused of it succeeding merely because you promoted it.

> In the past decade in “comp.lang.lisp”, he constantly
> reminds people of his article, and even explicitly requests others to
> use the terms Lisp1 and Lisp2, as opposed to other terms people used
> when discussing this issue, such as “Common Lisp way” or “Scheme way”.

The reason the term was invented was because Scheme seems to claim a
lock on aesthetics, claiming CL has none. I disagree with that, but it
creates a "warm fuzzy" feeling in the heart of people that biases
their opinions on specifics.  The extreme case of this was that once I
was in an ISLISP meeting with someone (I'll decline to embarrass that
person by saying who--it doesn't really matter) and I asked that a
particular definition be taken from CL to ISLISP.  No, they said,
because it came from CL and would make ISLISP big and bloated like
CL.  No, I said, it would make ISLISP only changed by adding this one
remark.  But they said no merely because of the source.  I've seen
less extreme cases of that, but my point is that it does happen that
people stop listening when you talk CL (and others stop listening when
you talk Scheme) so it's easier to be neutral and Lisp1 and Lisp2 are
not the official canonical unique only way to be neutral, they're just
possible ways of being. I promote them because they're handy.

This is one of those things like CAR/CDR where I don't really like
those names either. They're not evocative.  But no better names have
been advanced that have the uses CAR/CDR does e.g., for composing
CADDR etc.  The names LHS/RHS come very close because LRRLHS is
conceivable.  But it isn't as pronounceable even in English and is
even less pronounceable for people who have difficulty in an
international community who come from languages that blur the L and R
sound.  So I accept criticism for CAR/CDR but still use them.  That's
kind of how I use LISP1/LISP2.

Another argument you don't raise is the confusion with Lisp 1 (early
Lisp version, predating Lisp 1.5) and confusion with 1LISP, 2LISP, and
3LISP (Brian Smith's dialectal variants building up to a proper
reflective tower).  I wish more people knew of Brian Smith's work
because it's cool, but since they don't, that name collision isn't
very important either.

You further don't seem to treat the fact that CL is really a Lisp4 (at
least) and so the name LISP2 is a problem in that regard.  There is
also a term I created in subsequent discussion which is Lisp-Omega,
that talks about a Lisp with arbitrary user-definable namespaces.
There is no implemented Lisp-Omega, but there could be.  Still the
distinction between finite-dimension and infinite-dimension is
critical because the formal semantics people tell me that a Lisp-Omega
would have a much smaller formal semantics than a Lisp2 or LispN for
any finite N > 1.

You have also blurred the distinction between modules and packages.
They could co-reside and are not conceptually in conflict.  Lisp
packages are not modules and so some of the remarks you make in regard
to that make no sense to me.  Packages are a syntactic-token-
resolution-time notion and Modules are a lexical analysis time tool.
To some extent, packages assure a unique name across designers/code-
writers, not across programmatic elements.  Modules are more concerned
with some other division among code.  The concepts are more akin to
the temporal division between read-time, macro expansion time, etc.
Treating read-time and macro-expansion time in a blurry fashion as if
they were the same thing, as some languages do, omits the opportunity
to give texture and names and semantics to both concepts.  So, too,
blurring packages and modules.

I hope my remarks are seen as constructive and non-defensive, Xah.  A
lot of people seem to rush to my defense when you post, but I'm not
really bothered by posts such as this, which are constructively worded
and seem to have a fair amount of interesting points to be made.  I
marked your post 4 stars in Google to acknowledge that this was an
above-average post by you and in the form I'd like to see more of.  I
do disagree with you on some technical matters, but then we live in a
plural society and there's no reason my opinion even has to be right.

Mostly I thought it of interest that I don't 100% disagree with you.
There is in fact some overlap of opinion, we just don't agree on
everything.
From: Don Geddis
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <878wk2y7az.fsf@yoda.geddis.org>
Xah Lee <······@gmail.com> wrote on Mon, 8 Jun 2009 :
> lisp1 vs lisp2 is not good. It's old shit.
> lisp1 vs lisp2 are warts.

I can't tell what you're getting at.  Don't be so subtle.
Tell us what you really think.

> i don't see Common Lisp or Scheme Lisp ever will see the light of the
> day again.

Even if true, how would that be relevant to a discussion of the best
terminology to use for a particular concept?

Focus, Xah, focus!  Try to stay on topic!

> The lisp community has lots of warts, such as macros differences, and
> tail recursion fuck, small vs big, loop vs recursion

One wonders why you continue to post here, in this community of
people who share an interest that you don't share.

> I'll go on with my campaign on the beauty of Xah Lee

The beauty of Xah?  Are there photos to go along with this statement?
Or is this another claim of yours, similarly unsupported by evidence?

        -- Don
_______________________________________________________________________________
Don Geddis                  http://don.geddis.org/               ···@geddis.org
Your trysts with sanity are brief, and leave you unchanged.
	-- Schlock Mercenary (schlockmercenary.com), 12/22/2007
From: Adlai
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <a8804202-3df1-42b0-876b-6771642a86c6@k38g2000yqh.googlegroups.com>
On Jun 8, 8:16 pm, Don Geddis <····@geddis.org> wrote:
> Xah Lee <······@gmail.com> wrote on Mon, 8 Jun 2009 :
>
> > lisp1 vs lisp2 is not good. It's old shit.
> > lisp1 vs lisp2 are warts.
>
> I can't tell what you're getting at.  Don't be so subtle.
> Tell us what you really think.
>
> > i don't see Common Lisp or Scheme Lisp ever will see the light of the
> > day again.
>
> Even if true, how would that be relevant to a discussion of the best
> terminology to use for a particular concept?
>
> Focus, Xah, focus!  Try to stay on topic!
>
> > The lisp community has lots of warts, such as macros differences, and
> > tail recursion fuck, small vs big, loop vs recursion
>
> One wonders why you continue to post here, in this community of
> people who share an interest that you don't share.
>
> > I'll go on with my campaign on the beauty of Xah Lee
>
> The beauty of Xah?  Are there photos to go along with this statement?
> Or is this another claim of yours, similarly unsupported by evidence?

Some cats are better off staying in their boxes.

Seriously.
From: netsettler
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <5068b18c-611d-47e0-a8eb-8976e43ed096@f10g2000vbf.googlegroups.com>
On Jun 8, 1:16 pm, Don Geddis <····@geddis.org> wrote:
> Xah Lee <······@gmail.com> wrote on Mon, 8 Jun 2009 :
>
> > lisp1 vs lisp2 is not good. It's old shit.
> > lisp1 vs lisp2 are warts.
>
> I can't tell what you're getting at.  Don't be so subtle.
> Tell us what you really think.
>
> > i don't see Common Lisp or Scheme Lisp ever will see the light of the
> > day again.
>
> Even if true, how would that be relevant to a discussion of the best
> terminology to use for a particular concept?
>
> Focus, Xah, focus!  Try to stay on topic!

Personally, I thought Xah did a great job of being polite and of
focusing in the message to which you refer.  He doesn't always do
that.  He made some useful and thought-provoking remarks.  This
remark:

  "i don't see Common Lisp or Scheme Lisp ever will see the light of
  the day again. If there's any hope, that'd be New Lisp and Clojure."

does not appear mean-spirited.  It seems to me that he's making a
serious and constructive observation.

This remark:

  "Sure, you go on and write your elaborate writes and jolt
  youngster's attention to history. I'll go on with my campaign
  on the beauty of Xah Lee and importance of terminology.
  No hard feelings. At least, the those who code in Common Lisp,
  appreciate the technicalities in your writings."

was downright conciliatory coming from him, but offers honest
perspective about both my target audience and the relevance of my
writings.

I have always said that I think a constructive remark doesn't have to
be delivered politely, it just has to be something one can understand
and act upon.  (The action might not be desirable, but that's
different.  And it's helpful if things are polite, just not necessary
in order to qualify as constructive in my personal jargon.)  But in
any case, I think that paragraph qualifies as constructive under
anyone's definition.  Is there a minor amount of ego there, too?
Perhaps, but that's ok.  That's just personal style.  When Ken Tilton
does it, everyone laughs.

Xah has historically written some stuff that was not very helpful, not
just in terms of its foul nature but really in terms of not saying
much that I was able to extract.  But I think this piece is not that.
I think people are being predisposed to see negativity, and I'm
suggesting reading it with a fresh eye, at least this time around.
I'm not saying what that bodes for the future, just that this piece
seems to me just fine.

On this basis, I rated his post 5 stars because it's one of the better
ones he's written and it offers useful insight, and I want to
encourage that.

> > The lisp community has lots of warts, such as macros differences, and
> > tail recursion fuck, small vs big, loop vs recursion
>
> One wonders why you continue to post here, in this community of
> people who share an interest that you don't share.

Sometimes it's useful to have people with other points of view
involved.  I'm sure in some other forum, you'd do the same.

(People who don't see the in joke here should check out my recent
blogs on Open Salon [1], which are more often political than
technical, though they span a range of topic areas.  Don often stops
by to add political counterpoint there, since he and I don't quite see
eye to eye politically on a fair number of topics.  The extra point of
view he brings, even though he may disagree with this or that point
I'm making, quite often makes it a materially more interesting
discussion.)

Xah's remarks about Common Lisp and Scheme not surviving or becoming
visible are subjective (personal belief), but they are not isolated
merely to him.  And we all make subjective claims, so why shouldn't
he?

Besides, other people take the viewpoint he has on this, and the
landscape of the Lisp community IS changing, such that an occasional
reminder of the importance of catering to "durable" concepts is good.
I quibble a bit on a few of the details he cites as "evidence", but I
think he's making occasional sound points, and much more politely than
he's done in the past.

[1] http://open.salon.com/blog/kent_pitman is the blog
    (which has an RSS feed for people who like that kind of thing),
    though you may find it more useful to start from
      http://www.nhplace.com/kent/blog-summary.html
    which offers a by-hand categorization of topics for easy rummaging
by
    people wondering what I've been up to.
From: Don Geddis
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <87k52te0ae.fsf@geddis.org>
netsettler <······@nhplace.com> wrote on Tue, 30 Jun 2009:
> Personally, I thought Xah did a great job of being polite and of focusing
> in the message to which you refer.  He doesn't always do that. [...]
>
> This remark: [...]  was downright conciliatory coming from him [...]
>
> On this basis, I rated his post 5 stars because it's one of the better ones
> he's written and it offers useful insight, and I want to encourage that.

Maybe I was grading on an absolute scale, and you were grading on a curve,
relative to the past postings of The Great Xah?

If that were true, can't we both be right?

:-)
_______________________________________________________________________________
Don Geddis                  http://don.geddis.org/               ···@geddis.org
The difference between a kid and an adult is, when you're a kid, you throw
water balloons at cars.  But when you're an adult, you throw water balloons
FROM a car.  -- Deep Thoughts, by Jack Handey [1999]
From: Xah Lee
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <81656eaf-28e1-4f53-9cdc-aab8b250a1e2@j32g2000yqh.googlegroups.com>
On Jun 8, 11:59 am, Peter Keller <·······@merlin.cs.wisc.edu> wrote:
> In comp.lang.scheme Xah Lee <······@gmail.com> wrote:
>
> > lisp1 vs lisp2 is not good. It's old shit. Forever getting people to
> > live in the old days of your lisp vs my lisp fight, in fact, not much
> > different from fights among today's major lang groups.
>
> So, where is your replacement for the jargon, the syntax, the idioms,
> the math, the language itself?  Is there some 64 page document I can
> read which washes away the fields of crap that you see and imposes a
> perfect and irrefutable order upon it?
>
> If the answer is yes, I'd be happy to read and learn from it.
>
> If the answer is no, then start writing one.

happy to oblige.

• The Importance of Terminology's Quality In Computer Languages
  http://xahlee.org/UnixResource_dir/writ/naming_functions.html

• Jargons of Info Tech Industry
  http://xahlee.org/UnixResource_dir/writ/jargons.html

• Why You should Not Use The Jargon Lisp1 and Lisp2
  http://xahlee.org/emacs/lisp1_vs_lisp2.html

• The Term Currying In Computer Science
  http://xahlee.org/UnixResource_dir/writ/currying.html

• What Is Closure In A Programing Language
  http://xahlee.org/UnixResource_dir/writ/closure.html

• What are OOP's Jargons and Complexities
  http://xahlee.org/Periodic_dosage_dir/t2/oop.html

• Interface in Java
  http://xahlee.org/java-a-day/interface.html

• Math Terminology and Naming of Things
  http://xahlee.org/cmaci/notation/math_namings.html

• Politics and the English Language
  http://xahlee.org/p/george_orwell_english.html

On Jun 8, 5:27 pm, Peter Keller <·······@merlin.cs.wisc.edu> wrote:
> George Neuner <········@comcast.net> wrote:
> > Xah has a pathological hatred of jargon - it's best to ignore his
> > rantings about it.
>
> Ah. I see.
>
> Don't show him this then:
>
> http://catb.org/~esr/jargon/html/

btw, i have read the jargon file roughly from cover to cover during
1998-2000 period. That was a period when i was still learning unixes,
fascinated by its history. I have also, read pretty much the entirety
of documents on fsf.org or gnu.org as they exist at the time, and some
other writings by Eric guy such as his bizarre and cathedral fuck. (i
happened to actually read his Bazarre essay from cover to cover twice,
with some criticisms on the logics of exposition, but never actually
have written down.)

Today, i consider Eric S Raymond a asshole. Also, consider this
snipped about jargons file, from Wikipedia http://en.wikipedia.org/wiki/The_Jargon_File
:

«Eric S. Raymond maintains the new File with assistance from Guy
Steele, and is the credited editor of the print version, The New
Hacker's Dictionary. Some of the changes made under his watch have
been controversial; early critics accused Raymond of unfairly changing
the file's focus to the Unix hacker culture instead of the older
hacker cultures where the Jargon File originated. Raymond has
responded by saying that the nature of hacking had changed and the
Jargon File should report on hacker culture, and not attempt to
enshrine it.[2] More recently, Raymond has been accused of adding
terms to the Jargon File that appear to have been used primarily by
himself, and of altering the file to reflect his own political views.
[3]»

The Eric asshole also tried to erect his fame by creating some hacker
logo mother fuck.

The jargons file, 10 years ago or earlier, functions not only as a
dict for tech geeker's slang and culture, but as well as a important
technical reference on unixes and earlier technology. For the
technical aspect, it is pretty much surpassed by
http://en.wikipedia.org/wiki/Free_On-line_Dictionary_of_Computing
(which incorporate parts (or entirety) of jargon file)

But today, both are rather obsolete. Wikipedia by itself covers some
100 times the info on computing topics both in breadth and depth,
cultural or technical. (Wikipedia, also incorporate freely of both
jargon file or the FODOC, especially so in its early years.)

More Xah Lee for tech geekers:

• Links To Wikipedia from XahLee.org
  http://xahlee.org/wikipedia_links.html

• Lispers and Wikipedia
  http://xahlee.org/emacs/lispers_n_wikipedia.html

• Encyclopedia, My Experiences
  http://xahlee.org/Periodic_dosage_dir/encyclopedia.html

  Xah
∑ http://xahlee.org/

☄
From: Miles Bader
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <buod49fdyp5.fsf@dhlpc061.dev.necel.com>
Is there any subject for which xahlee _doesn't_ have a screed?!

-Miles
-- 
"Suppose He doesn't give a shit?  Suppose there is a God but He
just doesn't give a shit?"  [George Carlin]
From: ······@nhplace.com
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <fdc757c8-34d6-4829-8aa8-9775b6e202c6@q37g2000vbi.googlegroups.com>
On Jun 5, 2:51 pm, Zach Beane <····@xach.com> wrote:
> I came across approximately this statement yesterday:
>
>   Lisp-2 programmers avoid using the same names for functions and
>   variables.
>
> That didn't sound right to me. I use Common Lisp, and I couldn't come up
> with any personal examples of avoiding that practice. I also couldn't
> remember actively thinking about the issue at all; I just use whatever
> variable names seem natural.
>
> Then I tried to think of examples when I did use variables with the same
> name as a function: I often use the variable name list, and I often have
> variables with the same name as a slot accessor (I don't use the foo-of
> convention). But it hasn't been an active, conscious decision when
> writing, and it doesn't jump out at me when re-reading as some kind of
> clash.
>
> So my survey question is this: Are you are a Lisp-2 programmer, and do
> you avoid using the same names for functions and variables?
>
> Zach
>
> [I also posed this question in my blog, but I'm sure there are a lot of
> Common Lisp programmers here in comp.lang.lisp who did not see
> it. If you saw it there and responded, thank you. If you didn't, you can
> see the responses here:http://xach.livejournal.com/220107.html]

I aggressively use the same name often in lambda bindings exactly so I
can remember what a value is.
e.g.,
(DEFUN SYMBOL-NAME-SUFFIXED (SYMBOL SUFFIX)
 (LET ((SYMBOL-NAME (SYMBOL-NAME SYMBOL))
       (STRING (STRING SUFFIX)))
   (CONCATENATE 'STRING SYMBOL-NAME STRING)))

But on other occasions, I just like to use descriptive names, so if
someone is giving me a list, I tend to call the argument a list.
Since the type name and constructor are often named the same, I
definitely end up with collisions.

Historically, I was taught that trying to reuse the symbol name was
good because it conserved memory, recycling the same symbol for
multiple purposes rather than creating new ones. In Maclisp's 256Kword
address space, this mattered.  In the modern world, the memory size
thing doesn't matter but the "apropos space" (symbol clutter just
making list search of symbol names longer, etc.) still does matter
somewhat.

Mostly, though, I do it because English does it.  The English sentence
"Look at that pig pig out." or "How long will it take the cook to cook
dinner?" are perfectly ordinary and do not raise concern or public
outrage among speakers of English.  Brain hardware is adapted for
doing this, and certain computer scientists are determined not to
allow that brain hardware to be used for its natural function in an
unsupported claim that it is more "natural" to do otherwise.  The
evidence from "natural" language is that nearly every human language
does allow context-based meaning overloading.  This is an entirely
contrived discussion created by computer programmers who want to force
and unnecessary level of personal obsessive-compulsive disorder on a
larger community that is not requesting it.

Thanks for asking.
From: Raffael Cavallaro
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <h0giuc$v93$1@news.eternal-september.org>
On 2009-06-06 22:02:14 -0400, ······@nhplace.com said:

> Mostly, though, I do it because English does it.  The English sentence
> "Look at that pig pig out." or "How long will it take the cook to cook
> dinner?" are perfectly ordinary and do not raise concern or public
> outrage among speakers of English.  Brain hardware is adapted for
> doing this, and certain computer scientists are determined not to
> allow that brain hardware to be used for its natural function in an
> unsupported claim that it is more "natural" to do otherwise.  The
> evidence from "natural" language is that nearly every human language
> does allow context-based meaning overloading.  This is an entirely
> contrived discussion created by computer programmers who want to force
> and unnecessary level of personal obsessive-compulsive disorder on a
> larger community that is not requesting it.

Agreed. And similar arguments can be used for an imperative programming 
style and against functional programming as well. IOW, it seems clear 
from natural language that brain hardware is adapted for thinking about 
state and mutatation as well. Natural languages that conceive of 
everything as a verb (function) that produces a distinct new world (the 
return value) are much more rare (if they exist at all).
-- 
Raffael Cavallaro
From: John Thingstad
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <op.uu7fd0fout4oq5@pandora>
På Sun, 07 Jun 2009 16:30:36 +0200, skrev Raffael Cavallaro  
<················@pas.espam.s.il.vous.plait.mac.com>:

>
> Agreed. And similar arguments can be used for an imperative programming  
> style and against functional programming as well. IOW, it seems clear  
> from natural language that brain hardware is adapted for thinking about  
> state and mutatation as well. Natural languages that conceive of  
> everything as a verb (function) that produces a distinct new world (the  
> return value) are much more rare (if they exist at all).

Though I mostly agree with you, I observer that the brain can at most  
handle tree groups of three things at once. So rather than eliminate state  
I would suggest controlling it and limiting it. Lisp's model with classes  
for grouping global data and local variables with limited scope for local  
computation works rather well. The idea is that from the outside the  
operations of the function are functional but internally applicative style  
with state is allowed. I personally think this delivers a compromise which  
is in fact the best of both worlds.

---------------------
John Thingstad
From: Raffael Cavallaro
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <h0jejd$8dd$1@news.eternal-september.org>
On 2009-06-08 07:55:02 -0400, "John Thingstad" <·······@online.no> said:

> Though I mostly agree with you, I observer that the brain can at most  
> handle tree groups of three things at once. So rather than eliminate 
> state  I would suggest controlling it and limiting it.

I agree. I think that historically people using natural language have 
done this by hierarchical aggregation - we don't hold the name of 
everyone at our workplace in short term memory, we just say (or think) 
"the people at work.;" We don't hold the names of all 50 US states in 
short term memory, we just say (or think) "the US." Lisp gives us this 
ability with symbols and their bindings, and the ability to mutate 
these bindings is crucial for a good fit with human wetware.
--
Raffael Cavallaro
From: Slobodan Blazeski
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <af0521c4-a2ff-46d5-b184-eab08c888863@u10g2000vbd.googlegroups.com>
On Jun 5, 8:51 pm, Zach Beane <····@xach.com> wrote:
> I came across approximately this statement yesterday:
>
>   Lisp-2 programmers avoid using the same names for functions and
>   variables.
>
> That didn't sound right to me. I use Common Lisp, and I couldn't come up
> with any personal examples of avoiding that practice. I also couldn't
> remember actively thinking about the issue at all; I just use whatever
> variable names seem natural.
>
> Then I tried to think of examples when I did use variables with the same
> name as a function: I often use the variable name list, and I often have
> variables with the same name as a slot accessor (I don't use the foo-of
> convention). But it hasn't been an active, conscious decision when
> writing, and it doesn't jump out at me when re-reading as some kind of
> clash.
>
> So my survey question is this: Are you are a Lisp-2 programmer, and do
> you avoid using the same names for functions and variables?
Usually yes

bobi
>
> Zach
>
> [I also posed this question in my blog, but I'm sure there are a lot of
> Common Lisp programmers here in comp.lang.lisp who did not see
> it. If you saw it there and responded, thank you. If you didn't, you can
> see the responses here:http://xach.livejournal.com/220107.html]
From: William D Clinger
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <c9ed4e74-2e1f-47b9-a83d-9c2b76c63980@w3g2000yqf.googlegroups.com>
Zach Beane wrote:
> So my survey question is this: Are you are a Lisp-2 programmer,

Not when I can avoid it.

> and do
> you avoid using the same names for functions and variables?

As has already been pointed out, (1) the names of functions are
already variables, and (2) hygienic macros (with the occasional
controlled escape into non-hygiene) eliminate the main reason
for worrying about this.

Will
From: TomSW
Subject: Re: Survey: Do you use the "2" in Lisp-2?
Date: 
Message-ID: <7c51d2e7-adf3-49f5-b02f-ec963ee790e7@b14g2000yqd.googlegroups.com>
On Jun 5, 8:51 pm, Zach Beane <····@xach.com> wrote:

> So my survey question is this: Are you are a Lisp-2 programmer, and do
> you avoid using the same names for functions and variables?

No. I think the extra namespace reduces annoyance and in my experience
doesn't add confusion. My main professional Lisp experience was in
maintenance and it included many wtf!s, not one of which was due to a
confusion between function and variable names.

A few examples of things I found far more confusing than variables &
functions with the same name:

- a 100+ line function using a variable called result-list and another
called result-lists
- a 200+ line function
- a ~20 clause cond all of whose tests were string comparisons on the
same variable (write a string-based case macro already...)
- do-x functions that expect a lambda form, instead of do-x macros
that expect
- functions without side-effetts called things like "calculate-
factors" instead of "factors"
- if instead of when, when instead of unless, and vice-versa
- setf

regards,
Tom SW