Provide @immutable attribute for first-class citizens and namespaces?
Daniel Fitzpatrick
doubleagent03 at gmail.com
Sat Apr 14 10:58:55 PDT 2012
On Saturday, 14 April 2012 at 17:50:01 UTC, Daniel Fitzpatrick
wrote:
>> « 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
Okay...yes.
I hadn't thought about using attributes in that way. Maybe this
is a nonissue. :)
More information about the Digitalmars-d
mailing list