-
Notifications
You must be signed in to change notification settings - Fork 3
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
Should we define our own Functions or use ones from Base? #12
Comments
I personally prefer to use our own functions instead of reusing ones from Base. (Without exporting, we can still keep the same name) Based on our discussions at #8 , a lesson I learned is, we can't use existing containers (like vectors, tuples...) and existing functions in Base together, otherwise conflicts like So we have two choices: a. Reuse built-in containers but dispatch based on our own function (names) In the prior release, I adopted the second approach. The drawback is obvious that we have to always define a |
Hmm... yes, thanks for pointing out that this is a fundamental problem. If we have to completely commit to one of those, I vote for "a" because that is most obvious for someone defining a simple environment/problem, e.g. However, ideally, we should not need to make this choice because everyone would agree on the abstract meaning of Another note is that we cannot fully follow the principle of defining our interface in the CommonRLSpaces module because we can't re-define the iteration interface. Iteration is more fundamental than, say, I need to think about this more. |
If there are other example packages to consider, that might be helpful. |
Currently, we use
Base.eltype
andBase.clamp
in our interface. However this can be problematic since people tend to interpret these differently. For instance,eltype(1..2)
returnsInt
. (and hence the broken test atCommonRLSpaces.jl/test/product.jl
Line 34 in 00e365d
Should we introduce
CommonRLSpaces.element_type
andCommonRLInterface.clamp
to deal with these?The text was updated successfully, but these errors were encountered: