allocators-rs
allocators-rs copied to clipboard
Shorten type names?
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 theobject_alloccrate, andobject_alloc::Allocis pretty unwieldy - most people will want touse object_alloc::ObjectAllocand then use the type asObjectAllocwithout the crate prefix. - Do we expect most people to use
slab::Alloc(and other similarly-named types) asslab::Allocor justAlloc? If it's the latter, then it may actually be more clear to leave it as is (SlabAlloc). This also avoids a conflict with theAlloctrait from thealloccrate, which is likely to be used by code that also uses a slab allocator.
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.