Skip to content

unsafe proc chaining -> first proc unsafe = all procs unsafe #151

@mratsim

Description

@mratsim

I think it's good to make less easy to shoot yourself in the foot with "unsafe" proc, however unsafe proc chaining is needlessly verbose.

By using Nim move {call} optimization, I'd like to introduce that only the first proc call copies, all the others in the chain are unsafe by default. Consequently if the first proc is unsafe, the whole chain is unsafe. That avoids unsafeSlice.unsafeReshape.unsafeContiguous verbosity hell.

Implementation started for asContiguous in 1cfe13c

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions