[Issue 9061] BigInt | BigInt, BigInt & int
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 8 08:17:31 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=9061
--- Comment #13 from bearophile_hugs at eml.cc 2013-11-08 08:17:30 PST ---
(In reply to comment #9)
> I'm starting to think the best solution is to simply disallow bitwise
> operations that involve both a uint and a BigInt, and this is what I'll
> implement,
In such cases a strategy to use is ask what the most common use cases are. And
look at their expected performance.
If I have code like:
BigInt & 1
And I have to replace it with:
BigInt & BigInt(1)
Or:
BigInt & BigInt.one
What is the performance?
When a design is not clear, a design strategy is to start with a conservative
API (disallowing some operations), and only later allow some of them, when you
have a better idea of the needs. Allowing more operations later is possible,
while restricting an API later is harder and breaks code.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list