[ANSI-Smalltalk] re: array creation syntax
Panu Logic
panulogic at gmail.com
Tue Apr 22 04:50:33 BST 2008
Paolo Bonzini wrote:
> I proposed
> Dictionary from: { a -> b. c -> d }
> Set from: { a. b. c. d }
If we define the binary operators #-> and #. in a proper way,
I don't think there is a stressing need for syntactic extensions
to achieve a similar effect, is there?
Dictionary from: (a -> b) . (c -> d )
might just work, if we can define the binary operator #-> in the
right way.
And
Set from: a. b. c. d
might be enough if we can define the binary operator #. in the right way.
Neither of the above requires any new curly syntax { }, IF we can
define #-> and #. within the standard library to achieve a similar
result as to what you are proposing.
I think it is important to make a clear distinction between
extensions needed for
a) The standard syntax
b) The standard class-library
The Strength of Smalltalk has always been that you can
do so much with its STANDARD library, with a very simple syntax.
Just think about what we can do with block-closures,
without needing any specific built-in syntax for IF-THEN-ELSE.
-Panu Viljamaa
More information about the ANSI-Smalltalk
mailing list