-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BitSet API #2211
BitSet API #2211
Conversation
ready for @jackkoenig's review. |
poke @jackkoenig :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I'm being a real stickler here, but this feels like a very foundational API so I'm just trying to make sure we get it right.
/** | ||
* Subtract that from this BitPat | ||
* @param that subtrahend | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* Subtract that from this BitPat | |
* @param that subtrahend | |
*/ | |
/** Subtract that from this BitPat | |
* | |
* @param that subtrahend | |
*/ |
Please follow ScalaDoc standard practice: https://docs.scala-lang.org/overviews/scaladoc/for-library-authors.html
More importantly, I don't actually intuitively know what subtracting one BitPat
from another means. I don't think relying on regular mathematical intuition here is right, I think this doc needs to explain with examples what this means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was marked resolved but not addressed. What does it mean to subtract two BitPats? Even an example in the ScalaDoc would go a long way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor comments and unresolved old comments. This looks awesome, let's get this in.
I am a little nervous about BitSet
just being a new API. Could/Should we make it experimental?
e627a16
to
288181b
Compare
I think we should, however a non-experimental API then
seems to be crazy :( I'm not sure should I experimental both leave this decision to @jackkoenig ;p 288181b is non-experimental |
Ignore this, see below. |
What I mean by this, is that even if we make That being said, I think an imperfect amount of experimental is still better than none. So I'm now thinking that we should keep object and class |
7384175
to
34f313e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just need to fix the CI failure.
I think I need to add additional tests on this PR, I will work on this today. |
This avoids early dereference into term: Set[BitSet] during initization of a BitSet object, which will raise a Null dereference
reimplement #2126,
BitSet
is a set ofBitPat
, andBitPat
will extend fromBitSet
since essentially it is a subset ofBitSet
.Contributor Checklist
docs/src
?Type of Improvement
API Impact
API modification for
BitPat(width=)
(ask @jackkoenig for better solution to avoid this)Backend Code Generation Impact
None
Desired Merge Strategy
Release Notes
Add
BitSet
API.Reviewer Checklist (only modified by reviewer)
3.3.x
, [small] API extension:3.4.x
, API modification or big change:3.5.0
)?Please Merge
?