const - Best practices

2010-12-31 Thread Peter Alexander
Ok, so while I'm still not 100% satisfied with the lack of logical const in D, I'm willing to see how far I can get without bitwise const without going crazy, and I just want to clarify some things. Andrei has commented a couple of times on the fact that D's const has more guarantees than C++'

Re: const - Best practices

2010-12-31 Thread Rob
"Peter Alexander" wrote in message news:ifl719$2hp...@digitalmars.com... > Ok, so while I'm still not 100% satisfied with the lack of logical > const in D, I'm willing to see how far I can get without bitwise const > without going crazy, and I just want to clarify some things. > > Andrei has c

Re: const - Best practices

2010-12-31 Thread Jimmy Cao
I'm wondering about this, too.

Re: const - Best practices

2011-01-02 Thread Peter Alexander
On 31/12/10 6:33 PM, Peter Alexander wrote: Ok, so while I'm still not 100% satisfied with the lack of logical const in D, I'm willing to see how far I can get without bitwise const without going crazy, and I just want to clarify some things. Andrei has commented a couple of times on the fact th

Re: const - Best practices

2011-01-02 Thread Jonathan M Davis
On Sunday 02 January 2011 10:41:16 Peter Alexander wrote: > On 31/12/10 6:33 PM, Peter Alexander wrote: > > Ok, so while I'm still not 100% satisfied with the lack of logical const > > in D, I'm willing to see how far I can get without bitwise const without > > going crazy, and I just want to clari

Re: const - Best practices

2011-01-02 Thread Rob
"Peter Alexander" wrote in message news:ifqg7o$1hn...@digitalmars.com... > Sorry for the bump, but there's at least three people here that would > like an answer to this. Surely someone knows how to use const in D? :-) > http://www.digitalmars.com/d/2.0/const-faq.html

Re: const - Best practices

2011-01-02 Thread Peter Alexander
On 2/01/11 10:43 PM, Jonathan M Davis wrote: http://d.puremagic.com/issues/show_bug.cgi?id=1824 For the const/immutable situation to be totally useable, several dmd bugs must be fixed. Some of the major ones are 1824 (Object is not const-correct), 3659 (opEquals() and const needs to be sorted ou

Re: const - Best practices

2011-01-03 Thread Andrei Alexandrescu
On 1/3/11 12:06 AM, Peter Alexander wrote: [quoting an older post of mine] As an aside, I know what it takes to define lazily computed state to work with const, but Walter is at the bottom of a 5000 TeV potential hole that spells like "this is like C++ mutable and C++ mutable is incorrect, theref

Re: const - Best practices

2011-12-31 Thread Caligo
On Sun, Jan 2, 2011 at 4:43 PM, Jonathan M Davis wrote: > > > - Jonathan M Davis > Almost a year has passed, and what is the state of const now? Is it still broken? I've been reading some threads on SO, and I'm a bit confused as to what's correct in my code and what's not.

Re: const - Best practices

2011-12-31 Thread Mehrdad
On 12/31/2011 9:02 AM, Caligo wrote: On Sun, Jan 2, 2011 at 4:43 PM, Jonathan M Davis > wrote: - Jonathan M Davis Almost a year has passed, and what is the state of const now? Is it still broken? I've been reading some threads on SO, and I'm a bit confu

Re: const - Best practices

2011-12-31 Thread Jonathan M Davis
On Saturday, December 31, 2011 08:02:52 Caligo wrote: > On Sun, Jan 2, 2011 at 4:43 PM, Jonathan M Davis wrote: > > - Jonathan M Davis > > Almost a year has passed, and what is the state of const now? Is it still > broken? I've been reading some threads on SO, and I'm a bit confused as to > what