allocators-rs icon indicating copy to clipboard operation
allocators-rs copied to clipboard

Shorten type names?

Open joshlf opened this issue 8 years ago • 1 comments

RFC 356 specifies that names without prefixes should be preferred over names with prefixes - e.g., io::Error over io::IoError.

Currently, we use the latter naming convention - e.g., slab::SlabAlloc, slab::UntypedSlabAlloc, etc. We should abide by the proper, officially-accepted naming convention.

Open questions:

  • Should we rename ObjectAlloc? Probably not. It's in the object_alloc crate, and object_alloc::Alloc is pretty unwieldy - most people will want to use object_alloc::ObjectAlloc and then use the type as ObjectAlloc without the crate prefix.
  • Do we expect most people to use slab::Alloc (and other similarly-named types) as slab::Alloc or just Alloc? If it's the latter, then it may actually be more clear to leave it as is (SlabAlloc). This also avoids a conflict with the Alloc trait from the alloc crate, which is likely to be used by code that also uses a slab allocator.

joshlf avatar Aug 18 '17 15:08 joshlf

I personally think you should keep the original names, if I'm importing an object to pass to as an argument, like you probably would with an allocator, I'd rather it's descriptive then perfectly follows naming conventions.

ras-drive avatar Jul 28 '22 21:07 ras-drive