First cleanup of bitwise adapter + add to docs#4981
Conversation
|
cc @edi33416 please review |
|
LGTM |
I'm looking into it. I figured where the issue is and I hope I'll have a fix as soon as possible.
Andrei pointed out during the first stages of the review that storing both the
Will do
Sure
I will add some more examples
Will remember to do so
No, I have not. Thank you for your comments and observations. |
Yes, but my question was whether you benchmarked before you choose to store
It would be great if you could do so. Btw @edi33416 you know about core.bitop, right? |
We usually don't use benchmarks as criteria for acceptance. In this case the maintenance cost of the redundancy seemed too high. |
Ping & raising the priority on this one. The bitwise PR exposed internal tests & and we now test them, CircleCi now errors for master :/ It did go undetected because of #4964 As this PR will provide a proper public example, it will also fix CircleCi for master. |
Follow-up to @edi33416's #4927 (which imho was merged too early) and adds some of my unaddressed review comments:
bitwiseand hides the helper struct (no need to expose it and gives more flexibility later. The exposed public symbols are a relict)@propertyfunctions)__PRETTY_FUNCTION__fromassert(current Phobos policy is to use plainassert. Improvements toassertshould be done in the compiler)@edi33416 could you please add a lot more tests?
When I tried to come up with nice examples for the documentation I immediately hit a bug:
Also please:
front.See Andrei's remark about uncovered lines
Add a
@nogcunittestMake the second
unittest@safeas wellMaybe add more "showcase" examples if you wish so
Don't forget to add a changelog as well
Did you do some benchmarks on iteration via bitwise and "naive" bitwise iteration? (i.e. the incurred overhead)