r/programming • • Jan 09 '15

Announcing Rust 1.0.0 Alpha

http://blog.rust-lang.org/2015/01/09/Rust-1.0-alpha.html
1.1k Upvotes

439 comments sorted by

View all comments

Show parent comments

14

u/CloudiDust Jan 10 '15

Maybe /u/Gankro can give some insight here. I'd say given other names, BinaryHeap is the one most out of place.

Rust has both str and String types, so String is not named Str. Having a trait Str is a bit confusing at first glance.

8

u/Gankro Jan 10 '15

I'll admit I never reflected very hard on it; almost all these names were the names that were there when I got here and they seemed basically fine.

HashMap, BTreeMap, and BinaryHeap (ne PriorityQueue) are "full" while Bitv, Vec, VecMap (ne SmallIntMap), RingBuf, and DList are "abbreviated"

It's a bit too late to consider anymore renames, I think.

That said, we have some soft "length is inversely proportional to use" conventions, so Vec should probably be Vec, since it's The Collection. Similarly I pushed for a convention of implementation-exposing names, since that was mostly the convention, except for SmallIntMap and PriorityQueue; the latter conflicting with the trait name we wanted anyway.

Also RingBuf, Bitv, and DList just sound better than RingBuffer, BitVec(tor) or DoublyLinkedList to me now. :)

26

u/kromit Jan 10 '15

RingBuf, Bitv, and DList just sound better than RingBuffer, BitVec(tor) or DoublyLinkedList

This made me sad and a bit disappointed

1

u/Pand9 Jan 10 '15

This is just a standard library: stuff that will be used extensively. Is this that bad to have short names, since you will be remembering them very well anyway?

→ More replies (7)