Skip to content

Vector reform #2653

@msullivan

Description

@msullivan
Contributor

Reform how we handle vectors by introducing a new unboxed dynamically sized vector type and replacing uses of current vectors with boxed dynamically sized vectors.

Syntax still needs to be chosen and we need to determine exactly what restrictions we are going to place on dynamically sized types.

Activity

msullivan

msullivan commented on Jun 26, 2012

@msullivan
ContributorAuthor

I've become disillusioned with the idea of having real dynamically sized types for vectors. I don't really see any major win. The big thing seems to be that we can make our evec syntax ~[] and @[] in a principled and compositional way.
Even so, a lot of special casing will still be required, and we need to deal with adding a notion of dynamically sized types to the type system and figuring out what operations will be permitted on them. It seems to me that it will increase implementation complexity, not decrease it, and won't provide any real user facing benefit.

I think that what we want to do is leave the type system as is but make ~[] and @[] be special cased to be syntax for evecs.

graydon

graydon commented on Jun 26, 2012

@graydon
Contributor

Also need either a syntax for fixed size interior vectors, or the supertype-of-tuples thing niko suggested, at minimum.

Careful with all type-name substitutions, too.

graydon

graydon commented on Jun 26, 2012

@graydon
Contributor

... And special cases for function environment-capture types.

msullivan

msullivan commented on Jul 14, 2012

@msullivan
ContributorAuthor

I think all of the core parts of vector reform are done. I'm going to close the bug.

removed their assignment
on Jun 16, 2014
added a commit that references this issue on Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-frontendArea: Compiler frontend (errors, parsing and HIR)A-grammarArea: The grammar of RustA-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsA-type-systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @graydon@msullivan

        Issue actions

          Vector reform · Issue #2653 · rust-lang/rust