[Issue 1961] Allow "scoped const" contracts

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 28 08:00:00 PDT 2008


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





------- Comment #11 from schveiguy at yahoo.com  2008-04-28 09:59 -------
(In reply to comment #8)
> Back to proposal at hand, it seems the main question now is this one:
> 
> Walter Bright wrote:
> > 
> > For me, the question is is solving these issues a large enough problem 
> > that justifies adding a rather confusing new variation on const?
> 

IMO, using this proposal does not create more confusion, it creates less
confusion.  With this proposal, and with properly implemented library functions
one does not

- need to worry about whether a template function truly does not molest the
parameters
- need to worry about which function to call
- need to read documentation that contains umpteen different versions of the
same function, which vary just on constancy
- need to do any special casting to get around deficiencies in the library.

And a developer no longer needs to implement umpteen different versions of the
same function.

I think the result of this proposal being adopted might be that people feel
less intimidated by const, if they no longer have to worry about whether they
can call functions with any variable types.  And the results make intuitive
sense.


-- 



More information about the Digitalmars-d-bugs mailing list