www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Reverted const correctness on object.d

reply Benjamin Thaut <code benjamin-thaut.de> writes:
Why have all the const correctness fixes to object.d been reverted? I 
couldn't find anything inside the bug ticket.

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

-- 
Kind Regards
Benjamin Thaut
Oct 13 2013
parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Sunday, October 13, 2013 14:48:33 Benjamin Thaut wrote:
 Why have all the const correctness fixes to object.d been reverted? I
 couldn't find anything inside the bug ticket.
 
 http://d.puremagic.com/issues/show_bug.cgi?id=1824
What const correctness fixes? If you're talking about the failed fix at the end of that bug. I don't know. I'd have to dig through what it did. But the fix that was agreed upon in the last major discussion on Object's const- correctness was to remove opEquals, opCmp, toHash, and toString from Object so that derived classes could put whatever attributes they want on them. They're completely unnecessary on Object, since we can templatize all the druntime stuff that uses them, and having them on Object is causing problems. But that hasn't gotten very far yet, at least in part, because changing the AA stuff that would have to be changed is quite messy, and probably in greater part, because AFAIK not much of anyone has been working on it. There are four enhancement requests open for this (one for each function): http://d.puremagic.com/issues/show_bug.cgi?id=9769 http://d.puremagic.com/issues/show_bug.cgi?id=9770 http://d.puremagic.com/issues/show_bug.cgi?id=9771 http://d.puremagic.com/issues/show_bug.cgi?id=9772 I have an open pull request for druntime which improves the opEquals situation, but it hasn't been merged yet: https://github.com/D-Programming-Language/druntime/pull/459 This was the most recent discussion on a way to transition those functions off of Object: http://forum.dlang.org/post/mailman.214.1369617617.13711.digitalmars-d puremagic.com http://forum.dlang.org/post/mailman.280.1369712394.13711.digitalmars-d puremagic.com - Jonathan M Davis
Oct 13 2013
parent Benjamin Thaut <code benjamin-thaut.de> writes:
Am 14.10.2013 01:19, schrieb Jonathan M Davis:
 On Sunday, October 13, 2013 14:48:33 Benjamin Thaut wrote:
 Why have all the const correctness fixes to object.d been reverted? I
 couldn't find anything inside the bug ticket.

 http://d.puremagic.com/issues/show_bug.cgi?id=1824
What const correctness fixes? If you're talking about the failed fix at the end of that bug. I don't know. I'd have to dig through what it did. But the fix that was agreed upon in the last major discussion on Object's const- correctness was to remove opEquals, opCmp, toHash, and toString from Object so that derived classes could put whatever attributes they want on them. They're completely unnecessary on Object, since we can templatize all the druntime stuff that uses them, and having them on Object is causing problems. But that hasn't gotten very far yet, at least in part, because changing the AA stuff that would have to be changed is quite messy, and probably in greater part, because AFAIK not much of anyone has been working on it. There are four enhancement requests open for this (one for each function): http://d.puremagic.com/issues/show_bug.cgi?id=9769 http://d.puremagic.com/issues/show_bug.cgi?id=9770 http://d.puremagic.com/issues/show_bug.cgi?id=9771 http://d.puremagic.com/issues/show_bug.cgi?id=9772 I have an open pull request for druntime which improves the opEquals situation, but it hasn't been merged yet: https://github.com/D-Programming-Language/druntime/pull/459 This was the most recent discussion on a way to transition those functions off of Object: http://forum.dlang.org/post/mailman.214.1369617617.13711.digitalmars-d puremagic.com http://forum.dlang.org/post/mailman.280.1369712394.13711.digitalmars-d puremagic.com - Jonathan M Davis
Thanks for the explanation. I was just curious because the change made sense in the first place. I agree that removing them entierly is the better option. -- Kind Regards Benjamin Thaut
Oct 14 2013