From: Vassil Nikolov
Subject: why the plus signs around a constant's name
Date: 
Message-ID: <7demlb$hl3$1@nnrp1.dejanews.com>
Many people use plus signs around the names of constants.

Is there any specific reason why it should be a plus sign and not
any other non-alphanumeric different from an asterisk?  In particular,
is there any reason why it shouldn't be an equal sign, which does
not need the shift key?

(defconstant +plus+ #\+)

or

(defconstant =equal= #\=)

Vassil Nikolov <········@poboxes.com> www.poboxes.com/vnikolov
(You may want to cc your posting to me if I _have_ to see it.)
   LEGEMANVALEMFVTVTVM  (Ancient Roman programmers' adage.)

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

From: Sunil Mishra
Subject: Re: why the plus signs around a constant's name
Date: 
Message-ID: <efyd81x7zc6.fsf@peachtree.cc.gatech.edu>
Vassil Nikolov <········@poboxes.com> writes:

> Many people use plus signs around the names of constants.
> 
> Is there any specific reason why it should be a plus sign and not
> any other non-alphanumeric different from an asterisk?  In particular,
> is there any reason why it shouldn't be an equal sign, which does
> not need the shift key?
> 
> (defconstant +plus+ #\+)
> 
> or
> 
> (defconstant =equal= #\=)

After looking at a style guide and reading a few programs I decided
differentiating between variables (whose bindings can legally be modified)
and constants was useful. But then I suppose you would be looking for a
more historical perspective, I assume. My guess is that:

1. + looks like *, while many others don't.
2. They are both arithmetic (as opposed to comparison) operators.

Sunil
From: Kent M Pitman
Subject: Re: why the plus signs around a constant's name
Date: 
Message-ID: <sfwk8w429p7.fsf@world.std.com>
Vassil Nikolov <········@poboxes.com> writes:

> Is there any specific reason why it should be a plus sign and not
> any other non-alphanumeric different from an asterisk?

As with *'s, it's just a convention and its power derives from
people using it consistently so that it's easy to recognize.

+'s have been used by some people for well over 10 years.
But that doesn't mean you can't diverge.

Yet another reason that we don't require a specific naming convention.
Allows people to experiment with alternatives.
From: Vassil Nikolov
Subject: Re: why the plus signs around a constant's name
Date: 
Message-ID: <7dgodi$ahp$1@nnrp1.dejanews.com>
In article <···············@world.std.com>,
  Kent M Pitman <······@world.std.com> wrote:
> Vassil Nikolov <········@poboxes.com> writes:
>
> > Is there any specific reason why it should be a plus sign and not
> > any other non-alphanumeric different from an asterisk?
>
> As with *'s, it's just a convention and its power derives from
> people using it consistently so that it's easy to recognize.
>
> +'s have been used by some people for well over 10 years.
> But that doesn't mean you can't diverge.
>
> Yet another reason that we don't require a specific naming convention.
> Allows people to experiment with alternatives.

Yes, this is what I'm doing with =const=.

I suppose the reason for the particular choice has been lost in the
mists of time.  I just happen to be curious why people choose one
particular notation, especially when it is not random choice.

Vassil Nikolov <········@poboxes.com> www.poboxes.com/vnikolov
(You may want to cc your posting to me if I _have_ to see it.)
   LEGEMANVALEMFVTVTVM  (Ancient Roman programmers' adage.)

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
From: Paolo Amoroso
Subject: Re: why the plus signs around a constant's name
Date: 
Message-ID: <370212eb.2026535@news.mclink.it>
On Fri, 26 Mar 1999 01:08:03 GMT, Vassil Nikolov <········@poboxes.com>
wrote:

> any other non-alphanumeric different from an asterisk?  In particular,
> is there any reason why it shouldn't be an equal sign, which does
> not need the shift key?

Just a note: on my Italian keyboard, the = sign is shifted, while + is not.
Well, let's see the positive side: since on the same keyboard { and } are
not directly available while ( and ) are, Italian systems are probably
better suited for Lisp programming than C/C++ :-)


Paolo
-- 
Paolo Amoroso <·······@mclink.it>
From: Marco Antoniotti
Subject: Re: why the plus signs around a constant's name
Date: 
Message-ID: <lwogl8lqtp.fsf@copernico.parades.rm.cnr.it>
·······@mclink.it (Paolo Amoroso) writes:

> On Fri, 26 Mar 1999 01:08:03 GMT, Vassil Nikolov <········@poboxes.com>
> wrote:
> 
> > any other non-alphanumeric different from an asterisk?  In particular,
> > is there any reason why it shouldn't be an equal sign, which does
> > not need the shift key?
> 
> Just a note: on my Italian keyboard, the = sign is shifted, while + is not.
> Well, let's see the positive side: since on the same keyboard { and } are
> not directly available while ( and ) are, Italian systems are probably
> better suited for Lisp programming than C/C++ :-)
> 

I concur! Unfortunately (or fortunately) the italian *mind* is more
inclined toward INTERCAL. :)

Cheers

-- 
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa