[Pitch] Light-weight same-type constraint syntax

Without straying too far from the pitch at hand, I just want to say I agree wholeheartedly with this sentiment. I think I have a pretty strong mental model that separates each generic parameter's 'primary' constraints (those that don't reference any other generic parameters) from its 'secondary' constraints (those that reference other generic parameters). IMO, it would be great to be able to specify the 'primary' constraints up front to avoid the back-and-forth kind of reading that you note.

Do we have an idea of how common these problematic uses of existentials are? I have been under the impression for some time that many uses of existentials are isomorphic to the equivalent generic signature, and shouldn't incur any performance or optimization penalty.

3 Likes