-
Notifications
You must be signed in to change notification settings - Fork 1
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
Docstring and skeleton updates #12
base: main
Are you sure you want to change the base?
Conversation
…stead of erroring
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12 +/- ##
==========================================
- Coverage 38.41% 37.17% -1.24%
==========================================
Files 9 9
Lines 315 312 -3
==========================================
- Hits 121 116 -5
- Misses 194 196 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I see your point about |
I think one of the issues you are identifying in your comments is that
In retrospect, 3. is not a good use case for Then, for functionality where we want alternative implementations from Base (for example I'm still ok with having abstract type hierarchies of interfaces, part of that was matching the design of |
I went through the code and started adding some docs since I managed to get myself a bit confused about the whole code organization. I left some TODO-tagged questions in the code for now, which obviously have to be removed before merging but this seemed like the easiest way to link questions to code.
My main concern is that having
AbstractArrayInterface
is somewhat strange to me, probably because I'm missing the point a bit. If it is the abstract supertype for all interface types that should work forAbstractArray
, it seems to me like it is a very opinionated way of rewriting code, which seems a bit strange to me.Additionally, having an abstract type for an interface seems like a bit much to me, as I would expect that the only code that reasonably works for all
AbstractArray
assumptions is necessarily just the Base implementation.I like that we are trying to avoid code duplication, but I would honestly expect that if you want to write custom implementations for various functions for your own interface, it is quite likely that you either want a concrete implementation without interfaces, or explicitly dispatch through to the implementation of a different interface. For example, this would work:
I think I would find that a bit easier to follow than the current approach, because now it is virtually impossible to find what code is being called where, since everything is hidden behind macros, and the implementation can be either not "interfaced", abstractly interfaced, or concretely interfaced, based on the given type.
TLDR, maybe we could discuss a bit further and iterate a bit more on the implementation here