This is a really nice and important question.
I would really have a clear answer because it will make the system more
stable.
If you can build an analysis and let us know it would be really great.
Something related but not on the same topic is that I would love to have
a syntax for nested comments.
This is really annoying to have to uncomment parts when we have to
comment a large part. We discussed this back in 2007-2009 but we never
did it.
Stef
Le 28/8/16 à 12:17, Nicolai Hess a écrit :
Hi,
where can I find a good reference about what characters are allowed as
binary selectors (from old syntax definition) and what is nowadays allowed
by the implementations.
And whether the current set of allowed binaries selector includes some
additions on
purpose or if this is just a bug of the parser.
From what I found out, (Blue book and some other smalltalk syntax
definitions)
the current set of allowed characters includes the "special characters":
$! $% $& $* $+ $, $- $/ $< $= $> $? $@ $\ $| $~
(some implementation do not allow $@ and some calls $- not a special
character
but allowed as binary selector character)
And this is what String>>#numArgs uses. Therefore
'-' numArgs "->1".
'!' numArgs "->1".
And for example:
'§' numArgs "-> -1 (the -1 is indicating "not even a valid selector")"
But I am interested in the characters not called "special characters and
not even in the range 0-126.
The scanner allowes much more characters to be used as a selector name
(From the scanners typeTable) :
{Character value: 1 . Character value: 2 . Character value: 3 .
Character value: 4 . Character value: 5 . Character value: 6 .
Character value: 7 . Character backspace . Character value: 11 .
Character value: 14 . Character value: 15 . Character value: 16 .
Character value: 17 . Character value: 18 . Character value: 19 .
Character value: 20 . Character value: 21 . Character value: 22 .
Character value: 23 . Character value: 24 . Character value: 25 .
Character value: 26 . Character escape . Character value: 28 .
Character value: 29 . Character value: 30 . Character value: 31 . $! .
$% . $& . $* . $+ . $, . $- . $/ . $< . $= . $> . $? . $@ . $\ . $` .
$~ . Character delete . $€ . $ . $‚ . $ƒ . $„ . $… . $† . $‡ . $ˆ . $‰
. $Š . $‹ . $Œ . $ . $Ž . $ . $ . $‘ . $’ . $“ . $” . $• . $– . $— .
$˜ . $™ . $š . $› . $œ . $ . $ž . $Ÿ . $ . $¡ . $¢ . $£ . $¤ . $¥ .
$¦ . $§ . $¨ . $© . $« . $¬ . $ . $® . $¯ . $° . $± . $² . $³ . $´ .
$¶ . $· . $¸ . $¹ . $» . $¼ . $½ . $¾ . $¿ . $× . $÷}
This means you can define a method with for example the name "÷".
So , the question I want to ask. What do we want to allow as a binary
selector (character).
All that is nowadays "parseable" as binary selector, or only the set
of "special characters"
or something between both, and where to put this information, the
"this is an allowed binary
selector character" information?
Thanks
Nicolai