Implement more methods on stable Rust#27
Conversation
|
I am not quite sure if this is worth it. As you say there is quite a complexity trade of, going from zero to two dependencies, more complex bounds etc... |
|
I'm agreed with @usbalbin, I think is an different approach which does not correspond to the philosophy of crate |
|
What is said philosophy? Would you be okay if I locked this behind a feature like the nightly usage? |
|
@gwen-lg do you have any thoughts? Personally making it optional behind a feature flag feels a lot better. Still keeping it quite simple and with zero deps for those who dont want any, yet enabling nice features for those that need them. When the day comes and the required lang features are stabelized the extra complexity can be removed as well as the feature gate. |
|
I'm ok if it's behind a feature flag disabled by default ;) @GnomedDev : my vision of philosophy of the crate is : simple, no dependency, no unsafe. |
Replaces most of the usage of
generic_const_exprswith typenum based math.Pros:
Cons:
1024length, as written inhelpers.rsas thetypenum_mappingcall.This method of using typenum to replace GCE was originally developed for https://github.com/GnomedDev/aformat, and seems to work well from the user perspective.
Sadly, I wasn't able to replace
flat_map, as one limitation is how I cannot use "return type impl trait" (RTIT) as the type must be named in thewherebounds and this is necessary whenever closures are involved as they are totally unnameable.