-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
NO_FIELDS #175
Comments
Yes, arguably that would be more natural. Also because |
Yeah, this is really low priority in my opinion. |
Maybe it should be JuliaDiff/ChainRules.jl#396 (comment) |
This seems like it's higher priority now 😂 |
There appear to be several different opinions on this. For a structtype
I am in favour of 3 because it's consistent, and AD likes consistency because it means that you need fewer special cases, and can derive more things automatically. edit: updated the second type parameter in the |
3 is annoying amounts of work to type, in almost every rule. Even as The main virtue of composite charrying an a primal type with a Composite is to prevent adding things that are just happening agree on field names. That isn't so much of a problem if there are no fields/it is an AbstractZero. Since even if adding the wrong things you will still get the right answer. Aside: we should add |
Seems reasonable to me edit: we'd need to modify |
I still think either While I agree consistency is nice, we expressly do allow multiple differential types for the same primal type. |
While I don't disagree with anything in particular that you've said, I think there are other reasons to like consistency. Specifically:
AFAICT, the only advantage of |
I don't think writing |
I don't think we would name I am still pretty strongly opposed to it.
|
The compilation time is a pretty compelling reason to like |
Yes, that's a much more compelling reason than the spelling (to me, since i think |
Thought about this more. It is also what we will want it to be for purposes of filling in the right default type for (non-functor) functions in JuliaDiff/ChainRulesTestUtils.jl#117 so as to prevent our testing tools trying to pertube it.
|
when we do this we might want to |
Currently
NO_FIELDS
is equal toZero()
. Arguably, a more natural thing would be to make it an emptyComposite
and ensure that emptyComposite
s can be added to pretty much anything. Thoughts @oxinabox ?The text was updated successfully, but these errors were encountered: