A still sensible question about _ and :=

Bijan Parsia bparsia at email.unc.edu
Mon Apr 23 13:21:49 UTC 2001


On Mon, 23 Apr 2001, Peter Crowther wrote:

> > From: John Hinsley [mailto:jhinsley at telinco.co.uk]
> > Stephane Ducasse wrote:
> > > 
> > > Hi
> > > 
> > > I'm really wondering why Squeak code continues to have _
> > > instead of using :=.
> > > 
> > 
> > I actually prefer it! I find := pretty awkward to type
> [...]
> > I think we should ask the VW developers (politely, but 
> > firmly) to add _ as an alternative.

Just a note: We'd have to change ANSI too. Not a good idea, not going to
happen.

> I remember moving from ParcPlace 2.5 (_ only, IIRC) to VW1.0, where := and _
> were alternatives.  Hadn't realised they'd removed _ altogether.

Yep, and ANSI too.

> If my memory serves, the problem with VW was the C function interface, that
[snip]
> I'd like to be able to use _ in Smalltalk identifiers,

While I support making Squeak ANSI compliant on this front, there's a huge
thread where in I fought violently against having _ in St identifiers
willy-nilly. 

> and I'd like it to
> appear as _ in things like method comments.

Now *that* is an unambiguous good.

[snip]
> Eventually, I got used to the VW shortcut of CTRL-G ('gets')*, which is even
> easier for me to type than _ (I'm left-handed, and CTRL-G is an obvious
> left-handed chord).  If we could find some way of re-training the hardened
> coders to use a chord such as that, at least one obstacle would be removed
> :-).

If one continued to use _ *only* as the assignment operator, one could
modify the compiler to pretty print the _ as := at accept time. This woudl
ensure that all actual code was ANSI compatible with minimal disruption of
normal patterns. Indeed, one could set up the pretty printer to render :=
as _ when *browsing* so folks like me who kinda like the arrow could see
the arrow.

Cheers,
Bijan Parsia.





More information about the Squeak-dev mailing list