Something Go and Scala syntax

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Dec 30 07:51:11 PST 2010


For what it's worth invariant still works. It's a nice keyword, but we
already use it for class invariants. I prefer immutable over "val",
it's much more explicit and noticable in code and you'll never mistake
it for anything else since it's not a made up word. Plus you don't
have to do a "translation" in your brain when you read it - "this
variable is a val, so its immutable." vs "this variable is immutable,
period."

As for typing, how is that a problem in this day and age with
autocomplete or simple macro expansion? Heck you don't even need a
capable editor, you can have keyboard automation software in the
background that expands "im" to immutable or use whatever shortcut you
want to (Autohotkey is perfectly capable of this, and I'm sure Linux
has its own solutions).


More information about the Digitalmars-d mailing list