-
Notifications
You must be signed in to change notification settings - Fork 6
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
Towards v1.0 #165
Comments
Joel-Dahne
added a commit
that referenced
this issue
Oct 25, 2023
For some of the motivation see #165. The main reason is that the union and intersect methods in Base treat numbers as singleton containers, which is different from the Arb versions.
Joel-Dahne
added a commit
that referenced
this issue
Oct 26, 2023
For some of the motivation see #165. The main reason is that the union and intersect methods in Base treat numbers as singleton containers, which is different from the Arb versions.
Merged
Closed by #174 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have been thinking that it might be time for a 1.0 release. The interface has been fairly stable for some time and I see no reason to stay on
0.x
. There are a couple of things I would like to tackle before 1.0Base
methods, in particularunion
andintersect
but alsocontains
XLike
types in favor forXOrRef
types in the high level interfaceThe first two points are more or less self explanatory. For the documentation I have made some progress the last month or so.
For
union
andintersect
I have realized that the way we define them contradict the version inBase
, and is also easily misused. The issue is thatReal
types are so bothunion
andintersect
already have a well defined meaning for those types, which is different from how we currently use it. For exampleFor that reason I think it would be better to use some other name for taking the union or intersection of two
Arb
orAcb
. My proposal would besetunion
andsetintersection
, in line with for examplegetinterval
,getball
andsetball
. But I'm open to other ideas! The methodBase.contains
also has similar issues, but I haven't thought so much about how to deal with that one.Regarding
XLike
types I have noticed that I very rarely need to use anything other than theXOrRef
types with the high-level interface. When I do use the, it is mainly together with the lower-level interface. In most cases the high-level interface already usesXOrRef
, but there are some exceptions:XLike
hash
The main reason to avoid the use of
XLike
is that it includesPtr
types and this can lead to unexpected behavior. For example we currently overloadhash(x::Ptr{Arblib.arb_struct})
to compute the hash of thearb_struct
it points to, but if the pointer is null this gives a segmentation fault. For other pointer types the hash of the null pointer is well defined. For predicates it is for example slightly confusing whatiszero(Ptr{Arblib.arb_struct})
means, do we check if the pointer is zero or the thing it points to? For these reasons it seems reasonable to me to keep the use ofXLike
to the low-level interface as much as possible.I might come up with more things to handle before 1.0, in that case I'll add them here.
The text was updated successfully, but these errors were encountered: