Skip to content

suboptimal design of Fix, ComposedFunction, Returns, Splat, Broadcast.Broadcasted: sizeof(Base.Fix1(convert, Float32)) > 0 #59619

@nsajko

Description

@nsajko

Fix fails to be a zero-cost abstraction when either the callable or the fixed positional argument (or both) are types:

julia> sizeof(Base.Fix1(convert, Float32))  # would expect `0`
8

Fixing this would be arguably breaking, so I'm registering a new package providing a stand-in replacement to Base.Fix, Base.Fix1, Base.Fix2:

However perhaps this is something to reconsider for v2, or it could pass as a "minor change".

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions