any news on const/invariant?
Sean Kelly
sean at f4.ca
Thu Nov 29 08:25:31 PST 2007
Walter Bright wrote:
> Derek Parnell wrote:
>> If this truely is a case where "Head const turned out to be an
>> unexplainable, incomprehensible feature." and/or is too hard to
>> implement,
>> then I'll go with the flow. I haven't seen evidence of that being the
>> case
>> yet, regardless of Walter's statements so far.
>
> The only person I know of who understood it was Andrei. This is despite
> many hours spent trying to explain it with pencil and paper, on
> whiteboards (at the D conference), and on the n.g. Now, I'll be the
> first to say I stink at explaining concepts to people, but I watched
> Andrei try and fail at this repeatedly, and Andrei is very good at
> explaining things.
>
> I do not know why it is so hard to explain, but it is, and it's clear I
> was bashing my head on a rock with it, and that rock was going to sink D
> 2.0 if it wasn't changed.
My issue with the design wasn't so much with the conceptual complexity
(though this was still a bit high) as with the complexity it promised to
add to code. The const features in C++ are simpler from a semantic
standpoint than the proposed const features in D, and yet they can
complicate code tremendously. With D I would prefer to sacrifice a bit
of functionality in exchange for simpler code.
Sean
More information about the Digitalmars-d
mailing list