http://d.puremagic.com/issues/show_bug.cgi?id=9408


[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #3 from [email protected] 2013-02-03 11:43:10 PST ---
(In reply to comment #2)
> I think this change is a step backwards.

I think in this discussion there are two main sides:

Some people want to write D code right now, so they don't want to fight too
much with problems caused by const. And they like "freedom". Often this side is
also associated with the "worse is better" language design philosophy.

They other camp reads the texts written by the creator of the Eiffel language,
that explain what Contracts are and what they are meant to. For them a
precondition or an invariant should never modify the state of the struct/class.
And the language should enforce this, to avoid bugs. They accept less a bit
less convenience for stronger guarantees and "cleaner" code.
Mathematics-oriented people are often on this side.

D language has introduced const/invariant, but it's so strong that sometimes
you don't want or your can't use it. So sometimes D programmers don't want to
eat their own dog food.

I generally prefer a more "clean" style of coding, because from experience I
have seen that the amount of time wasted making a fussy type system happy, is
often paid later in less bugs, that otherwise waste far more of my time.

But in the end I sympathize with both camps, for different reasons. Both are
partially right. In the end a static analysis tool can just enforce all
invariants to be tagged with "const", so the end result is not too much
different.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to