3 ms·
> I think thats the most i should say about the quality of the stack vm specification or its semantics As someone who spends a lot of time with Ethereum, I'd l
by aakilfernandes 11y ago
> I think thats the most i should say about the quality of the stack vm specification or its semantics
As someone who spends a lot of time with Ethereum, I'd love to hear more. Honestly, I almost never deal with the stack level language (only the higher level Solidity). Isn't it possible to write whatever language you like on top of that stack based language?
- cdetrio 11y agoThere is a proposal[1] to upgrade the current EVM to a WebAssembly based VM. Since webAssembly has a llvm backend, any language with a llvm compiler (which is most of them) could be used to write contract code. 1. https://github.com/ethereum/EIPs/issues/48 https://github.com/ethereum/EIPs/issues/48
- adrianm 11y agoThis is a vast oversimplification of the problem. LLVM is a compiler IR; nothing more. It is not portable (you cannot generate IR for one target and have it work for another target) and it does not trivially map to the semantics of most languages beyond C. A programming language is a combination of many components; assembly optimization and target code generation is just one important part of a much larger picture. I'm only responding critically because I've seen this trope that LLVM is some sort of universal programming language target way too often now. It misleads people into underestimating the scope of the actual problem. LLVM is not a panacea. If you really want to make your platform programmable from any programming language, invest time into a well designed C API. Your users will thank you.
- cdetrio 11y agoThis is addressed in the linked issue.[1] Your criticism is the reason why (a subset of) WebAssembly is used, not LLVM IR. 1. https://github.com/ethereum/EIPs/issues/48#issuecomment-169019813 https://github.com/ethereum/EIPs/issues/48#issuecomment-1690...
- carterschonwald 11y agotheres also the issue that committing to too low level an IR really makes it hard to do nice optimizations in a portable way! :'(