Skip to content
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

Add Ref-like broadcast #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

serenity4
Copy link

@serenity4 serenity4 commented Feb 27, 2021

Currently, broadcasting over e.g. a Vector{<:Result} complains about Base.length(::Result) not defined, as Result is assumed to be an iterator type. Since Result is not an iterator, I believe it would make sense to adapt Base.broadcastable so that we can broadcast on Result containers.

I don't think this requires any tests, but I can add one if you prefer.

EDIT: my bad, broadcasting on a vector containing Results is actually fine. The problem happens when broadcasting with a Result not Refed. I still believe this to be nice to have, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant