Skip to content

Higher level error message on broadcast materialize! failuresΒ #45086

Open
@ChrisRackauckas

Description

https://discourse.julialang.org/t/blog-post-about-my-experiences-with-julia/79976/73?u=chrisrackauckas highlights this issue. Currently when you get an error from broadcast, it shows you the full stack for the broadcast machinery. Broadcast is a very complex thing, and the errors are in pieces that aren't even part of the documented machinery, so it's just confusing to new users. While broadcast is complex in implementation, it's a feature you'd expect users to use even on their first day of Julia.

That's a bad combination: really deep errors for the first simple x = 2.0; y = 4.0; x .= y

We could capture errors in materials for common cases like Number and throw much earlier with a much more clear message. "We" all know the error is going to be about mutation, but we should assume that a user that hits this kind of thing may not even know mutation, and so we could at least do 100x better here with just a few simple error messages.

Metadata

Assignees

No one assigned

    Labels

    broadcastApplying a function over a collectionerror messagesBetter, more actionable error messages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions