Open soraros opened 7 months ago
Thanks for filing the GH issue after the Discord discussion. I kick-started a discussion last week with the Standard Library team and broader Mojo users internally. We've decided on a new name for DynamicVector
and we'll communicate the upcoming renames in the changelog. Still need to decide on a new name for InlineFixedVector
.
@JoeLoser could you please take a look at this issue: https://github.com/modularml/mojo/issues/1528? This is also related to renaming and will be the best to take steps with this sooner than later :)
@JoeLoser could you please take a look at this issue: #1528? This is also related to renaming and will be the best to take steps with this sooner than later :)
👍 just replied over there, thanks for pointing me at it. It's definitely something we need to do, but all of the name changes won't happen in the next month or so given other things going on internally that are more urgent related to supporting other teams and getting things in order for open-sourcing the stdlib.
@JoeLoser As part of the rename, may I suggest also renaming CollectionElement
to CollectionItem
? This would improve consistency with the getitem
, setitem
, and delitem
dunder methods which currently manipulate "Elements" despite their name implying that they manipulate "Items".
As a separate issue, the type parameter of DynamicVector
(and related types) should probably be named Item
instead of T
, since that is more descriptive/self-documenting.
Now the DynamicVector
is gone, what about
InlinedFixedVector
: maybe InlinedList
following InlinedString
which is string with SSOStaticTuple
: clearly an array, even the IR says so. Can we graduate it into collections.array
?StaticIntTuple
, do we still need this?
Review Mojo's priorities
What is your request?
Rename
DynamicVector
and friends to something more sensible. LikeDynamicArray
, andInlinedFixedVector
could simply beArray
, etc.What is your motivation for this change?
I find "dynamic vector" a bit tautological, given the "vector" terminology (likely) comes from C++, which literally means "dynamic sized array".
InlinedFixedVector
is even worse, not really dynamic dynamic array, but I guess double negation elimination is a thing.Any other details?
No response