Provide @immutable attribute for first-class citizens and namespaces?
Daniel Fitzpatrick
doubleagent03 at gmail.com
Sat Apr 14 10:50:00 PDT 2012
> « immutable: » can't do the trick ?
Do you mean to extend the immutable keyword instead of adding an
attribute, or that the immutable keyword, as is, is enough? I'm
fine with the former. The latter is problematic. Think
turnabout - would you enjoy having to mark all of your variables
'mutable' when you wanted them like that? As it is, that would
add a ton of declarations to the standard library.
> BTW, this proposal is a bit problematic without a mutable
> keyword.
I thought about this: I wouldn't be interested in it. I would be
interested in a library which provided containers with different
semantics for atomic mutation. What Clojure provides is pretty
spot on:
http://clojure.org/refs
http://clojure.org/agents
http://clojure.org/atoms
More information about the Digitalmars-d
mailing list