The Status of Const
Jonathan M Davis
jmdavisprog at gmail.com
Thu Aug 12 23:49:29 PDT 2010
On Thursday 12 August 2010 22:10:20 Kagamin wrote:
> Jonathan M Davis Wrote:
> > but the bugs related to it have made
> > it difficult, and I just haven't written very much large stuff in D - and
> > that's where you really need it.
>
> How I'm working on a large project written in C#. C# has only D1 const
> system. Here I've seen no bugs caused by all data beign mutable. Even with
> public mutable fields. Usually bugs we have are unimplemented logic,
> incorrectly implemented logic, exceptions swallowing, undocumented
> external unmanaged (and buggy) library, that wants nice parameters. And
> bad design, oh... desing is baaaad.
Of course, you can write large projects without const. Many other languages
which are heavily used lack const. However, there is great benefit in having
const, and you're most likely to derive that benefit from large projects where
things are much more complex then you are with small projects where you can
probably keep most of it in your head and/or you're the only one working on it.
You can obviously do lots of quality programs without const, but having it is a
big plus.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list