5 ms·
It uses effectively only the one keyword assure. The constraints look like fields on the type variables, which have an ambiguity with package private method exp
by mbnull 7y ago
It uses effectively only the one keyword assure. The constraints look like fields on the type variables, which have an ambiguity with package private method expressions with the same name.
- dotaheor 7y agoThe constraint expressions are expected to be used in generic declaration body scopes instead of top package scopes. For example: https://github.com/dotaheor/unify-Go-builtin-and-custom-generics#contracts https://github.com/dotaheor/unify-Go-builtin-and-custom-gene..., so I think the ambiguity should not happen.
- karmakaze 7y agoI would prefer naming that feels less procedural. I think of it like a guard so maybe `when` or `where`. It can also just be some punctuation like `| cond` `| another-cond`.