[Issue 9724] Range predicates are not restrictive enough to justify assumptions made in Phobos code
https://issues.dlang.org/show_bug.cgi?id=9724 Iain Buclaw changed: What|Removed |Added Priority|P2 |P3 --
[Issue 9724] Range predicates are not restrictive enough to justify assumptions made in Phobos code
https://issues.dlang.org/show_bug.cgi?id=9724 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --
[Issue 9724] Range predicates are not restrictive enough to justify assumptions made in Phobos code
http://d.puremagic.com/issues/show_bug.cgi?id=9724 monarchdo...@gmail.com changed: What|Removed |Added CC||monarchdo...@gmail.com AssignedTo|nob...@puremagic.com|monarchdo...@gmail.com --- Comment #1 from monarchdo...@gmail.com 2013-03-15 04:16:33 PDT --- Predicates? Did you mean traits or restrictions ? Either way, I don't think that's the problem, as TrollFace (and immutable TrollFace) are both 100% legit Ranges. The problem lies in the implementation that attempts to be immutable aware, and tries to cast away immutability via copying. Which it can't. The solution is to simply strip range of all its unqual code. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9724] Range predicates are not restrictive enough to justify assumptions made in Phobos code
http://d.puremagic.com/issues/show_bug.cgi?id=9724 --- Comment #2 from timon.g...@gmx.ch 2013-03-15 04:54:07 PDT --- (In reply to comment #1) Predicates? Did you mean traits or restrictions ? They are predicates, mappings from types to bool. Either way, I don't think that's the problem, as TrollFace (and immutable TrollFace) are both 100% legit Ranges. The problem lies in the implementation that attempts to be immutable aware, and tries to cast away immutability via copying. Which it can't. The solution is to simply strip range of all its unqual code. I think TrollierFace will still break many of them. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9724] Range predicates are not restrictive enough to justify assumptions made in Phobos code
http://d.puremagic.com/issues/show_bug.cgi?id=9724 --- Comment #3 from monarchdo...@gmail.com 2013-03-15 06:21:39 PDT --- (In reply to comment #2) (In reply to comment #1) Predicates? Did you mean traits or restrictions ? They are predicates, mappings from types to bool. Ah OK, I was confused, given the term is often used in algorithms for a specific context. Either way, I don't think that's the problem, as TrollFace (and immutable TrollFace) are both 100% legit Ranges. The problem lies in the implementation that attempts to be immutable aware, and tries to cast away immutability via copying. Which it can't. The solution is to simply strip range of all its unqual code. I think TrollierFace will still break many of them. Hum. My testing shows that once you fix the ranges, then the code mostly just fails at the call side, since all these functions take by value. But had they taken by ref, then the error would be inside the implementation, so good catch. I think there is a bug in isForwardRange. It should test at the very least that the result of save can be used to instantiate a new Range (eg: R r2 = r.save;). If we don't have this, then being able to call save is mostly pretty irrelevant... ...either that, or too restrictive to be useful anyways. I had a fix prepared for another un-related bug in isForwardRange, so I'll also do this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---