Skip to content

Proposal for handling of vector constructorsΒ #535

@Shimuuar

Description

@Shimuuar

Currently we export constructors for mutable vectors since they're needed for defining immutable ones and don't export constructors for immutable vector. There's two problems: 1) access to constructors is very unsafe and we expose them by default for mutable vectors 2) they're occasionally useful and we don't for immutable ones.

  1. For each vector data type we create Unsafe module and define both mutable and immutable vectors there. Export both with appropriate disclaimer. This module would be a good place for unsafe conversion functions as well.
  2. Hide constructors for mutable vectors and provide deprecated pattern synonyms with same name for backward compatibility.

This way we can both provide access to constructor when one needs them and keep them hidden in standard scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions