On Saturday, September 24, 2016 08:03:15 Martin Nowak via Digitalmars-d wrote: > On Friday, 23 September 2016 at 20:57:49 UTC, Nick Sabalausky > > wrote: > > were rejected because it was deemed both easy enough and > > preferable to get these features by modifying DMD to add > > behind-the-scenes AST magic to "assert". > > > > So...umm...yea...whatever happened to that beefed-up "assert" > > feature? > > assertPred!"=="(a, b); > assertPred!"!"(a); > assertPred!(std.range.equal)(a, b); > > Seems to do most of what DIP83 does w/ expensive feature design, > and compiler implementation work. > Also http://code.dlang.org/packages/unit-threaded comes with a > couple of test comparators, though it follows ruby rspec's bad > idea of giving every comparator a name (which has to be learnt > and documented).
assertPred as I had implemented it previously worked quite nicely except for the fact that it resulted in a fair bit of compiler overhead with all of the template stuff it was doing (I don't know how much that could be improved). As I recall, it was generally well-liked. It was just that some folks (Andrei included IIRC) thought that assert should be able to do at least the basics of what assertPred did automatically, which is why it was rejected. Since that time, there has been a greater push to do stuff in libraries where we can rather than to make the language do more, so maybe it would go over better today than it did then. - Jonathan M Davis
