-
Notifications
You must be signed in to change notification settings - Fork 386
[DOC] Discuss trade-offs/advantages of Rust vs. AssemblyScript #360
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
@mikedotexe do you think we can just add this as-is to the intro page for contracts: http://localhost:3000/docs/roles/developer/contracts/intro or is there more work to be done to kind of "prove" the differences listed here with experimental evidence? |
Hmm, in our practice difference between Rust and AS modules is not 20%, it usually several times different. Recent discussion about this. |
Just to add to the above, as a possible starting point, here's something I came up with a while ago for a partner:
|
I think that intro link you suggested is a great place for it. And thanks for stepping in, too, @MaxGraey, as I tend to see quite a discrepancy between Rust and AS with AS being significantly smaller than 20%. I don't want to be vague in documentation, but I think we'll want to avoid numbers figures like 20% here because we've seen sizes across the spectrum. I'm not envisioning a huge page that takes a week to write, but a few paragraphs covering what we've discussed here. I think it's quite natural for someone to ask why they should choose one over the other and I'd love to have that link in my holster ready for quick-draw. 🤠 |
I would like to be clarified a little on these points:
Since 0.10.0 AS fully support abstract methods and partially interfaces. But closures still in progress.
Yes, Rust overall more mature language, but type system in AS pretty strong. Much stronger than in C++ or Java due to preventing implicit unsafe conversions, having nullable types and built-in null checking and etc. It still have some unsound for access uninitialized properties, which should be fixed in this PR.
That's right. But AS is just superset of TypeScript which has pretty large community also if I'm not mistaken Neat has own runtime with non-standard persistent primitives, set of functions and etc. Rust really has a lot more libraries and packages compare to AS, so I would say this is the most significant drawback of AssemblyScript at the moment |
Hey there! After reading a few threads about Rust vs AssemblyScript thing, I didn't find any good explanation why AssemblyScript is not recommended for finance apps development except for its early adoption and the lack of third-party libraries. I totally get Rust selling points like advanced type system, memory safety, low-level optimizations, etc., but for small/medium-sized (code-wise) contracts and most of the developers do those really matter much? I agree with @MaxGraey here. Can anyone elaborate on "why" please? |
Closing this issue as we are deprecating support for AS in favor of JS SDK. |
Is your feature request related to a problem? Please describe.
As a user, I want to make sure I'm using the correct programming language to write my smart contracts. I am unaware of the implications on storage or gas and would like to see a page detailing this.
Describe the solution you'd like
A page or section in the docs that goes over gas and storage implications of using AssemblyScript vs Rust.
Additional context
Good thoughts here from Max:
Is there anything where AS stands up more than Rust (or vice versa)?
There are many Web2 projects that could benefit from migrating or integrating with us. Many of these web-projects are built by the developers who are used to JS/TS-like ecosystem. AssemblyScript is our attempt to make the transition for the people coming from the Web2 world as easy as possible. Currently, anyone who is familiar with TypeScript can build an end-to-end application on us.
Overall, we want to have contract languages that provide a good coverage of all ecosystems:
And something we are currently brainstorming:
from:
https://discordapp.com/channels/490367152054992913/510254340120903684/714528239040856114
The text was updated successfully, but these errors were encountered: