-
Notifications
You must be signed in to change notification settings - Fork 14
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
Type checking task #6
Comments
Thanks for your interest @markwylde and I totally agree that type checking is better done at compile time as at runtime it's far less useful. That being said I don't think there is much value in implementing a custom type checker just for this library. Instead I think it would be more beneficial to leverage & invest in good integration with existing type checkers. I personally have being looking into http:https://flowtype.org as it's gives you algebraic data type system that is more or less what this library is trying to provide at runtime. Unfortunately there are still gaps that prevents me from making typed-immutable and projects using it type checkable. If you'd like to help with compile time type checking there are two areas you could really help:
Let me know if this sounds like a right direction & if it sounds something you'd be interested in helping out with. Thanks |
Unfortunately I am no longer able to maintain this project, I apologize. If someone wishes to step up and take leadership of this project please respond to #21 |
Really nice project.
One of the main benefits to having types in code is that during compile time (or during your transpiling process) you can be warned of places where you have set the wrong type or called using the wrong type.
Typescript for example will warn you if you do something like:
The above will output an error explaining you have used a string instead of number type.
Would building a task to check the codes type safety be within the scope of this project?
Maybe using esprima and the parsing down the tree?
It's something I might try and help with if you feel it's within the scope, but thought I would ask as it would be good to get your opinions on this before starting extra work on this.
The text was updated successfully, but these errors were encountered: