-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Both Haxe and TypeScript have support for type parameter constraints.
Haxe has a bit more support, because you can extend multiple types:
class Something<T:(Iterable<String>, Measureable)>In TypeScript you can only extend a single type:
interface G<T, U extends Function>None of these languages support Java's super constraints:
List<? super Integer>Spaghetti could support TypeScript-style single-type extends, and leave the more esoteric stuff out.
Syntax could be based on TypeScript/Java:
<T extends Iterable<String>, X extends T>