I am not down on AI as a concept but I hate the AI SEO pretty bad. It reminds me of before I quit television. Ads extract just enough attention that it's hard to look away, but then it says nothing of value. Like eating a giant wad of cotton candy or something maybe?
Found an article "explaining" the tradeoffs of using Solidity vs. Rust for writing your blockchain smart contracts. Must have been written by AI because it can't clearly articulate that you can't write contracts in Rust on any except for a few platforms, so they are not a real "choice" you can make, it just talks about Rust type safety lol. okay, but I still can't use it.
@Ukko the article messes this up. evm is stack based and rust is heap based. you could implement solidity on top of a system that uses Rust but not vice versa.
@Ukko ethereum virtual machine is really primitive. there are some newer virtual machines that work using webassembly and you can compile rust to them and they are much more efficient than the EVM.
@Ukko@Moon going with only core+alloc (not std, which needs an OS and a heap), then writing one's own allocators and using them for standard collections (like Vec etc) could work, but yeah, no idea how bad would it be for the gas costs.
@subtype@Moon Would you even get any benefits from rust in EVM :thinking_cirno: familiarity with language is far outweighed by the performance hit here
@Ukko@Moon no idea, the only time I've seen rust "ported" to a vm was gleam (rust on the erlang vm), and the language ended up only superficially similar, with no traits etc (which imo makes it worse than useless, statically typed lanugages with no generics suck)
@Ukko@subtype I can't imagine there is any benefit because it's not going to magically make more efficient code than the solidity compiler, the constraint is the EVM itself.
@Ukko@subtype On the other hand Arbitrum has a wasm vm as an experiment and it appears that writing contracts for it use a lot less gas. it's just a better vm at the end of the day I guess.
@Moon@subtype Yea I'd say then you have to compare solidity compiled to wasm vs something-else to wasm. Maybe they have just valued wasm instructions less than corresponding EVM ones
@Ukko@subtype I think they did this because it does still have soldity support but I am not sure. I don't actually understand how it works because the EVM has necessary types that are non-native to webassembly
@Ukko@subtype I am actually baffled at how expensive smart contracts are to execute considering how very very little they "do". storage is different, of course
Add comment