The provided implementation for Marker is most likely good enough for a large majority of the use-cases, however the inability to use it more than once is limiting.
Drawbacks
Is it a breaking change?
It is a breaking change
Can it impact performance, learnability, etc?
Arguably, the added set of carets for the generic type makes the code busier.
ZST, etc might not be the friendliest to newcomers.
I don't see how performance could be impacted.
Unresolved questions
I'm not the most knowledgeable in terms of generics, isn't it possible to have "default" generics? If so, the changes would only be additive and not breaking.
If it comes down to breaking changes, a rename should be considered, I feel that SimpleMarker could be more appropriate.
I should be able to spend time on a PR implementing this if accepted
Description
U64Marker
becomesU64Marker<T: ?Sized>
,U64MarkerAllocator
turns intoU64MarkerAllocator<T: ?Sized>
, allowing the following:Motivation
The provided implementation for Marker is most likely good enough for a large majority of the use-cases, however the inability to use it more than once is limiting.
Drawbacks
It is a breaking change
Arguably, the added set of carets for the generic type makes the code busier. ZST, etc might not be the friendliest to newcomers. I don't see how performance could be impacted.
Unresolved questions
I'm not the most knowledgeable in terms of generics, isn't it possible to have "default" generics? If so, the changes would only be additive and not breaking. If it comes down to breaking changes, a rename should be considered, I feel that
SimpleMarker
could be more appropriate.I should be able to spend time on a PR implementing this if accepted