On 03/12/2010 01:38, Walter Bright wrote:
Steven Schveighoffer wrote:
On Thu, 02 Dec 2010 13:57:04 -0500, Bruno Medeiros
<brunodomedeiros+s...@com.gmail> wrote:

On 29/11/2010 14:56, Steven Schveighoffer wrote:
This has been discussed at length on this newsgroup, and I argued
for it
for a long time. You will not get any traction with Walter, because
I've already proven that logical const == const, and it still doesn't
change his mind.

Could you detail a bit what do you mean by logical const == const ?
That doesn't sound right to me.


Here is where I show how logical const already exists, it's just
clunky to use.

BTW, this was before TLS, so the example would have to be updated a bit.

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=58927


What you're doing is keeping an alternate, mutable reference to each
object. This does not mean that logical const == const.

The statement "logical const == const" is meaningless really. Please use better terms people. ~_~'

What Steven was trying to say, I think, is that you can always emulate the behavior of logical const in D in a valid (safe) way, and that therefore the current D const system doesn't actually offer more guarantees than having logical const (by this I mean having mutable members).

Whether this is true or not, that's the question. I don't think it is true, I've argued that in a reply to the previous post. Note that the other extreme, which you mentioned: "Having mutable members destroys any guarantees that const provides. ", is also not true. (again, argued in another post).

--
Bruno Medeiros - Software Engineer

Reply via email to