Generic const - a non-functional view

Steven Schveighoffer schveiguy at yahoo.com
Tue Jun 24 14:07:09 PDT 2008


"Leandro Lucarella" wrote
> Steven Schveighoffer, el 24 de junio a las 13:30 me escribiste:
>> I understand that this proposal might be difficult to implement in the
>> compiler, and it might just be not worth the effort.  There are a lot of
>> problems that can be solved by not using const or using interfaces, 
>> instead
>> of these constructs.  However, this proposal represents what I think is 
>> the
>> most lenient and flexible proposal that is also const-correct from those 
>> I
>> have read, and allows for almost any const contract specification 
>> (excluding
>> head-const).  Whether it gets implemented or not, it was interesting to
>> think about how to solve all these problems, and I enjoyed the challenge.
>
> I agree with this. I think it´s wonderful, well thought proposal, which
> seems to address almost all the const issues in an elegant way, but I find
> it a little too complex and hard to understand/explain to worth it
> (besides the possible complex implementation).

Well, at least you agree :)  I also agree it is complex to explain, but as I 
replied to Walter, an average developer doesn't have to know about how it 
works to use it, if the library writer has already set up the appropriate 
const groups.

Thanks for the reply!

-Steve 





More information about the Digitalmars-d mailing list