In more ways than one, programmers are born to have strong opinions about tiny things, and here are 5 of mine. Follow these 5 tips--or disagree with them veh...
2 was good, thanks. 4 needs a tad more thought imho, returning an impl T does have its place, because it makes changing the return type of the function a non-breaking change.
Hmm, right. I think it still might be warranted in niche cases, but trying to think of such a case made it pretty protracted in my head… maybe when functions can also be called for side effects, and the into conversion is costly and the caller might not care about the return value?
2was good, thanks.4needs a tad more thought imho, returning animpl Tdoes have its place, because it makes changing the return type of the function a non-breaking change.Number 4 is only about not returning
impl Intoand instead just returningT.Hmm, right. I think it still might be warranted in niche cases, but trying to think of such a case made it pretty protracted in my head… maybe when functions can also be called for side effects, and the
intoconversion is costly and the caller might not care about the return value?