Why so few binary method selectors?

Florin Mateoc Florin at integral.com
Mon Mar 22 17:49:00 UTC 1999


I agree with your point, but this would also justify "normal" arithmetic
precedence rules for numerical notations (I would personally like that very
much, and I think it would be a big improvement in Smalltalk's accessibility
for newcomers. I have repeatedly seen this as an argument against
Smalltalk's "simple" syntax. It was also my personal experience that while
message sends in general, and the precedence rules for unary versus binary
versus keyword selectors are easy to grasp, the unusual precedence rules for
arithmetic "operations" contradict something very well engrained)

Florin



-----Original Message-----
From: Andrew C. Greenberg [mailto:werdna at gate.net]
Sent: Monday, March 22, 1999 1:55 AM
To: squeak at cs.uiuc.edu
Subject: Re: Why so few binary method selectors?

[....] What distinguishes binary operators for 
mathematics from [.] or @ for indexing and from dot notation for 
selection is not that the former is more "natural" than the latter, a 
question of degree and aesthetic dispute, but that the former is 
actually INDISPENSABLE for a practical expression language including 
operations on numbers.

The virtue of binary mathematical operators seems, to me, different 
in kind, not merely in degree, from the other syntactic notations 
upon which some insist here.  Rather than make the standard one of 
arguing for "naturalness," as the criteria for adopting a syntax 
change from Smalltalk's elemental simplicity, perhaps a more 
conservative policy is called for:

The numbers notation was a major concession, but an essential one. 
The language remained impractical without it (although one could 
conceive of surviving if truly forced to write (1 plus: 2) times: 3). 
Perhaps no change should be made unless it met that hefty criteria: 
Unless the new notation adds a meaningful functionality not present 
beforehand, or unless the new notation is necessary to  make the 
language practical, perhaps no changes should be made to the 
fundamental elemental syntax.

I raise this more to test the idea than to advocate it.  It just 
seems to me that noone has really said the obvious truth: special 
notation for arithmetic is almost sui generis, and probably necessary 
to keep the underlying language from failing the giggle test.





More information about the Squeak-dev mailing list