mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-05 19:11:00 +01:00
Update generic-constraints.md
added more for alternative 2
This commit is contained in:
parent
dd7650a44b
commit
8e20e26f6c
1 changed files with 1 additions and 1 deletions
|
@ -104,4 +104,4 @@ In this example, `T` must either be a number or vector, and setting annotating v
|
|||
1. Don't do this; this would make it impossible for functions like above to be able to be automatically inferred correctly. Just let people explicitly annotate their variables instead of inferring types. This makes code more verbose.
|
||||
> This would disallow for code that specifically makes use of generics to automatically output a response.
|
||||
2. Manually write verbose overloaded functions types.
|
||||
> This is not ideal, and suffers the same pitfalls as alternative 1.
|
||||
> This suffers the same pitfalls as alternative 1, and does not allow for code to be easily expandable. An example can be found as Attempt 3 of Equality Constraints.
|
||||
|
|
Loading…
Add table
Reference in a new issue