-
Notifications
You must be signed in to change notification settings - Fork 108
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 #420
Comments
I cannot answer the code-generation question, but according to MDN,
|
There is no way to disable the checks right now. It could be nice to add support for The compiler is rather naive and the type checks are everywhere. It also makes the output huge, because those are inlined. It'd be nice to wrap those type checks in JS functions in prelude, so Of course, it would be even better to do some basic analysis in the compiler and remove some unnecessary checks. I started a few attempts to add a smarter compiler, but never got enough time to finish it. But if anyone has time and some will, it is doable. |
Sure, but |
Maybe go this way:
Maybe it's easier than compiler redesign? |
I think the default should be to check the types always. |
Definitely so. by default, type checking is always enabled. Introduce the
As an option. |
it should disable all checks: arrays, indices, strings, lists. |
I'm trying to perform some computations on the browser-side, which is rather slow sometimes.
I see in the JSCL-generated code a lot of type checking like this:
It seems strange, because Math.sqrt can return numbers only and, anyway, that checks are slowdowns the code.
Is there a way to disable type checking in generated code?
The text was updated successfully, but these errors were encountered: