Persistent list
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Mon Nov 16 19:50:10 PST 2015
On Monday, 16 November 2015 at 00:00:18 UTC, Andrei Alexandrescu
wrote:
> This illustrates a simple procedural problem. The entire point
> of my posting a simple example of a complete container was to
> avoid hypotheticals such as this. The code is there and shows
> that no, physical const does not suffice. At least I don't know
> how to do it. If you think it does there's one way to show it,
> it's easy - write the code that does it.
>
> We could sit on our testes all day long, speculate how things
> ought to work, and feel awfully smart in the process. It's very
> easy to do. Hell, I've done it more than too many times. What's
> more difficult is have a positive, constructive approach that
> builds on a weak solution to improve it. This is the kind of
> dialog we need to foster.
Sadly, design I would love to see also doesn't seem to be
implementable but because of different issue - missing scope
control. I gave a quick go to implement something that shows my
desired semantics -
https://gist.github.com/mihails-strasuns-sociomantic/1d7529eef723b1132564 (only essential functionality to show stuff). As you may see it is totally different from your initial proposal - this is why making constructive feedback is rather hard :)
But chosing between breaking physical const via @mutable and
waiting until we finally get lond wanted scope control tools I am
very much in favor of the latter.
More information about the Digitalmars-d
mailing list