Skip to content

Conversation

@vtjnash
Copy link
Member

@vtjnash vtjnash commented Apr 17, 2023

Code should normally preserve values, not the types of values. This ensures the user can define styles with metadata, and requires less type-parameter-based programming, but rather can focus on the values.

Note that this style of functions should be better eventually (for latency and memory use), but currently isn't yet optimally dealt with since in the runtime we still generate and preserve unnecessary convert(typeof(args), args) calls via fieldtypes, and so we separately need to improve lowering and/or inference to work better on this, where one of the elements of the args tuple is inferred as Any.

@vtjnash vtjnash force-pushed the jn/simplify-broadcast-cntr branch 2 times, most recently from a0fae36 to 05c6296 Compare April 17, 2023 21:50
Code should normally preserve values, not the types of values. This
ensures the user can define styles with metadata, and requires less
type-parameter-based programming, but rather can focus on the values.
@vtjnash vtjnash force-pushed the jn/simplify-broadcast-cntr branch from 05c6296 to 5d0a527 Compare April 18, 2023 13:27
@dkarrasch dkarrasch added the broadcast Applying a function over a collection label Apr 19, 2023
@vtjnash vtjnash merged commit 02b7b04 into master Apr 20, 2023
@vtjnash vtjnash deleted the jn/simplify-broadcast-cntr branch April 20, 2023 15:36
N5N3 added a commit to N5N3/julia that referenced this pull request Oct 14, 2023
On master, `combine_styles(bc::Broadcasted)` calls `BroadcastStyle(typeof(bc))`, which seems bad after JuliaLang#49395 as it has a `Style()` call.
N5N3 added a commit that referenced this pull request Oct 15, 2023
On master, `combine_styles(bc::Broadcasted)` calls
`BroadcastStyle(typeof(bc))`, which seems bad after #49395 as it has a
`Style()` call by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

broadcast Applying a function over a collection

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants