Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support type parameter constraints #107

Open
lptr opened this issue Jul 30, 2014 · 1 comment
Open

Support type parameter constraints #107

lptr opened this issue Jul 30, 2014 · 1 comment

Comments

@lptr
Copy link
Contributor

lptr commented Jul 30, 2014

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>
@encse
Copy link
Contributor

encse commented Jan 23, 2015

I'd like to +1 this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants