2 ms·
Bitcoin also uses stack oriented language, and the interpreter is actually very short and simple: https://en.bitcoin.it/wiki/Script https://en.bitcoin.it/wiki/
by xiphias2 7y ago
Bitcoin also uses stack oriented language, and the interpreter is actually very short and simple:
https://en.bitcoin.it/wiki/Script https://en.bitcoin.it/wiki/Script
https://github.com/bitcoin/bitcoin/blob/master/src/script/script.cpp https://github.com/bitcoin/bitcoin/blob/master/src/script/sc...
- triska 7y agoYes! Stack-based abstract machines are often used because they allow compact code that is very easy to create and interpret. As another example, Pascal p-code (UCSD p-code) is also stack-based: https://en.wikipedia.org/wiki/P-code_machine https://en.wikipedia.org/wiki/P-code_machine The Java Virtual Machine (JVM) also uses an operand stack: https://en.wikipedia.org/wiki/Java_virtual_machine https://en.wikipedia.org/wiki/Java_virtual_machine
- jacobush 7y agoThat P-code was not (quite!) portable between computers, was a lost opportunity. How cool it would have been.