Scala and Java: A Quick Swing Comparison by Example
Author |
Message |
wtd
|
Posted: Thu Dec 08, 2005 11:27 pm Post subject: (No subject) |
|
|
Well, you might have:
code: | foo "hello", "world" |
Which is equivalent to:
code: | foo("hello", "world") |
And that's all well and good, but...
code: | bar foo "hello", "world", "wooble" |
Is this:
code: | bar(foo("hello"), "world", "wooble") |
One thing that constructing the Swing comparisons in previous posts did make me envy from the Smalltalk side of things... Smalltalk's semi-colon.
Being able to easily send multiple messages to the same receiver without having to specify the receiver repeatedly. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
rizzix
|
Posted: Thu Dec 08, 2005 11:48 pm Post subject: (No subject) |
|
|
that's why Obj-C's/Smalltalk's multi-part methods are soo cool! (but implementing that would mean "No Java Compatibility".
edit: wait.. OR.. define a tuple as (T, K, L, ...) then you could have the cake and eat it too where all java methods are methods with tuples. |
|
|
|
|
|
|
Page 2 of 2 [ 17 Posts ]
|
Goto page Previous 1, 2 |
|
|
|
|