Some questions on Slate syntax
Brian Rice
water at tunes.org
Sat Mar 26 16:38:03 PST 2005
On Mar 26, 2005, at 4:15 PM, David Hopwood wrote:
> Bill Sun wrote:
>> 1. Why 0-based arrays?
Bill gave most of the good answers for this. We've also adapted
Smalltalk-80's control-flow methods for iteration so that checking
against size - 1 for end-of-sequence conditions is transparent (e.g.
below:do: vs. to:do:).
>> 2. Why no arithmetic precedence in binary messages?
>> Again, it seems more intuitive to include arithmetic precedence as
>> it's
>> common knowledge.
>
> I agree with this. OTOH Slate's syntax is derived from Smalltalk, which
> did not have arithmetic precedence.
This is a user interface issue and belongs in a real user interface
(whether you interpret that as graphical syntax or custom Slate
grammars for the sole purpose of making everyone comfy, and I am not
opposed to either, if done right). Smalltalk-80's binary operator
syntax is designed for simplicity and message-sending orientation, so
context-sensitive precedence obscures this basic way you're supposed to
look at things. Also, precedence decisions for anything but "common
knowledge operators" are anything but obvious - maybe if Perl 6's new
parsing structure for precedence is actually useful and not awful as I
suspect, we'll allow it in a user interface.
--
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/
More information about the Slate
mailing list