-
-
Notifications
You must be signed in to change notification settings - Fork 670
Proposal. How about have two modes "typed strict" and "compatibility"? #19
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
Comments
Hmm, well, I understand the intention, but at the end of the day there'll always be some things that are not 100% compatible. Take array indexes for examples - we really shouldn't make these f64s. But this makes me think: Maybe we shouldn't provide |
Yes, as an option. |
I see. What can be done today is adding a mechanism to specify the stdib path when invoking asc, making it possible to switch to another one, so everyone can experiment with alternatives. Would that be something you are interested in? |
Definitely "yes" |
While thinking of it I figured that this could also be used to extend on stdlib implementations. Replacing the default one could be |
And may be better move stdlib out in separate package and repositaties in AssemblyScript organization? With libas and libts names for example |
I'd rather avoid that at this point in time. I already felt that all the packages the prototype had were unnecessarily complex to manage, especially since all these components are usually tightly coupled to a specific version of the compiler. |
Usage:
Similar to stdlib this includes all top-level .ts files in compilation, and exposes their exports as globals. |
Closing this for now. Feel free to reopen if something else is required :) |
Assemblyscript is my dream project, thanks for such a good project. I am trying to promote it wherever I can. But full typescript compatibility is the only way to get the whole ts/js ecosystem behind. Otherwise assemblyscript will remain a small island, nobody will try to change their code from standard typescript. We should make it seemless, as easy as possible. Why can't we use V8 API to evaluate/run dynamic language features? Also double should be default number type and other numbers should be exposed advanced users. Please take it serious, I want this project to be successfull |
full dynamic features is not possible now and will not expect in future so using any typescript code "as is" without minor modifications is not possible. We want stay independent from any host (and v8 as well) also it require some wasm features which not exists in MVP like |
…-update Update AssemblyScript to latest upstream
* 'master' of github.com:jedisct1/wasa: Fixed the memory leak for Time.sleep (AssemblyScript#33) Improve Descriptor (AssemblyScript#25) Bump assemblyscript from 0.9.2 to 0.9.4 (AssemblyScript#27) Deps Optimizations + update dependencies (AssemblyScript#21) Bump @as-pect/cli from 2.7.0 to 2.8.1 (AssemblyScript#23) Bump assemblyscript from 0.9.1 to 0.9.2 (AssemblyScript#24) Fix Date.now to return milliseconds instead of microseconds (AssemblyScript#19) Bump assemblyscript from 0.9.0 to 0.9.1 (AssemblyScript#17)
Assembly Script is superset of typescript that's mean it should have some compatibility with typescript if I right understand one of the main goal. In this case we might easily portable typescript code to AS with minimal changes. In other hand with WebAssembly we have got int64 arithmetics, atomic operations and etc.
For example in typescript
parseInt
return double with NaN when something wrong, but in AS we can return i64 which make sense, but we loose compatibility.My propose is make two macro definitions as compile option modes or string hint. One of them is safe compatibility with JS/TS runtime and other produce code with all wasm capabilities.
Thought?
The text was updated successfully, but these errors were encountered: