-
Notifications
You must be signed in to change notification settings - Fork 49
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
Higher Kinded Types #152
Comments
IMO I don't think it's worth even talking about TS issues that aren't even planned to be implemented. There's little reason to consider reserving syntax if TS hasn't even decided upon the syntax or if it's something they will support. |
The TS team accepts the idea in general, it is just not deeming it as not a priority for their current development. (see here) If the goal of this proposal is to form a standard typing syntax for tools like typescript to make use of, isn't discussing syntax like this important? There is a good amount of references to the TS issue asking how to implement data structures that rely on higher level types or waiting for it to be resolved, so I think it should be considered |
My point is that it's not had an official, accepted syntax proposal, nor has it had even a vague implementation timeline - it's currently a theoretical addition to the language. The point of this proposal isn't to consider the scope of all things that might possibly be added to type languages in the future; to do so would be to define a proposal to boil the ocean. There are TS features that are explicitly excluded from this proposal and those that are being culled after initial inclusion as well. Which is why I said that unplanned, not yet officially accepted TS features are really out of scope. |
IMO this kind of request fits into the general request for a more permissive grammar, re: #103 & #122 The proposal (type annotations, not this issue) should be less focused on features that TypeScript supports (current and future) and more focused on a specification for static typecheckers to implement. That way we're not constrained by the current state of typescript and TS can continue to organically grow. |
The issue describes a more generic type syntax space, (essentially a new form of comment) where arbitrary syntax (with a few limitations) can be used inside of the comments, leaving it up to type systems like TypeScript to decide what their syntax is. |
Hello, I just wanted to draw attention to microsoft/TypeScript#1213 which outlines discussion about syntax for higher kinded types which greater enable the implementation of chainable APIs
For example: this implementation of a chainable object will revert back to the super type
Mappable<B>
when.map()
is called onOtherMappable
The proposed syntax would look like
whereas, without, you have to follow a pattern like this:
The text was updated successfully, but these errors were encountered: