Hi @Florian Diebold, I left a review of your PR, but I figured maybe we could discuss here (I find it easier to track comments on Zulip than GH).
The only big concern obviously was the matter of the
Debug impl (also cc @scalexm, I'd be curious to get your opinion)
@nikomatsakis well, yeah that's annoying; another option would be to:
Debugbounds everywhere where the code used to rely on the super-trait from
Ah, that's...maybe a good idea, yeah.
or maybe a bit simpler, have a non-parametric impl for
Fold, so they would be implemented only for some concrete
Debug as a super trait)
that would probably work too
mmh no actually that wouldn't work so easily because of
ParameterKind<EnaVariable> being used in another crate and still needing a
Debug impl (
EnaVariable being local to that crate)
well anyway, I'd be ok for using a new-type around
Another (probably bad) idea: add a third type parameter to
ParameterKind that just controls what the Debug implementation does
@Florian Diebold yeah that may be nicer indeed
I guess we'd have to try implementing that solution to see if it fits well
I'll try it out
hrm no, it'd require adding a PhantomData to the enum to use the type parameter, and that's a huge disruption :/
The newtype doesn't seem so bad (so far)
Pushed the newtype variant to the PR.
@nikomatsakis I don't think implementing
iterate_range as an extension trait would work, because of the impl trait?
nikomatsakis I don't think implementing
iterate_rangeas an extension trait would work, because of the impl trait?
oh, maybe not, yeah, no big deal