On 2010-12-06 00:16:27 -0500, Graham St Jack <[email protected]> said:

First, I have to say that it is wonderful that someone is taking a serious look at this area again, and even better, you have come up with a compiler patch to make it happen!

Some questions (assuming your patch or something like it gets into dmd):

Does this mean that I would be able to write this:
immutable(Foo)ref foo; // create a reference
foo = new immutable(Foo)(); // re-bind it (not sure about "new" syntax for immutables)

That's the whole point yes. This syntax works with my patch. :-)


Are there any other show-stopping syntax issues that are holding up widespread adoption/rollout of const-correctness?

Surly there are others issues to solve. But this one is the one I kept falling into when trying to use immutable objects in my code some time ago.


What do Walter and Andrei think?

That I'd like to know.


--
Michel Fortin
[email protected]
http://michelf.com/

Reply via email to