Scala collections

Russel Winder russel at russel.org.uk
Sat Jun 18 02:12:26 PDT 2011


On Fri, 2011-06-17 at 21:12 -0400, bearophile wrote:
[ . . . ]
> > "var"/"val" are very short names for often used keywords. (not too descriptive though)
> 
> In origin it was "invariant", then we have asked for "immutable", but now I like val better because it's shorter. I have seen D code use more "const" maybe just because "immutable" is a longer word.
[ . . . ]

Groovy folk debated this one a few days ago, and the consensus was that
val and var are far too similar to have such huge differences of
semantics.  In the Java context, to which Groovy is intimately tied,
using def and final seems to be winning the day.
  
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110618/a457ead2/attachment.pgp>


More information about the Digitalmars-d mailing list