A space used to be accepted between minus sign and number in old versions of Squeak compiler (before 2010)
But I doubt this was decided on purpose.
IMO it was more a side effect of the implementation, which had messy corners
(the fact that the tokenizer did produce two tokens $- and positive number)
I would add that this was undocumented, dialect specific, and a false good idea letting newbies think that they can use unary prefixed operators...
There is no such thing in the language.
-------------------------------------------------------
http://source.squeak.org/trunk/Compiler-nice.120.mcz
==================== Summary ====================
Name:
Compiler-nice.120
Author: nice
Time: 23 February 2010, 5:14:44.049 pm
UUID: 9429cc05-281b-484e-94c2-bd0baf4f5230
Ancestors:
Compiler-nice.119
Authorize - at any position in binary selectors (like VW 7.7)
See
http://bugs.squeak.org/view.php?id=3616
Address the problem of
compiling 1@-2 with following strategy:
If
compiler is non interactive, then
compile with backward compatibility 1 @ (-2).
If
compiler is interactive, propose a menu to disambiguate and insert a proper space.
1@ -2 -> MessageSend receiver: 1 selector: #'@' argument: -2
1@- 2 -> MessageSend receiver: 1 selector: #'@-' argument: 2
Warning: Squeak did understand (1@-�� ��2) as (1 @ (-2))....
I didn't do anything to support this vicious Squeakism, and by now the semantics are change.