3 ms·
Most of these languages are also bootstrapped! I wonder when we'll see Swift written in Swift. And I wonder what kind of monstrosity a PHP written in PHP would
by jeremiep 10y ago
Most of these languages are also bootstrapped!
I wonder when we'll see Swift written in Swift. And I wonder what kind of monstrosity a PHP written in PHP would look like.
- ben-schaaf 10y agoYou can't practically bootstrap an interpreted language. That being said, I'd be intrigued to see PHP run using multiple nested interpreters from different language versions.
- shakna 10y agoMany Lisp interpreters are bootstrapped, have a glance over the examples of meta-circular evaluators at Wikipedia: [0] [0] https://en.wikipedia.org/wiki/Meta-circular_evaluator#Examples https://en.wikipedia.org/wiki/Meta-circular_evaluator#Exampl...
- giaour 10y agoPyPy is Python implemented largely in Python, and it supposedly is faster than python's C implementation.
- stefantalpalaru 10y ago> PyPy is Python implemented largely in Python It's actually a superset of a subset of Python and it's called RPython: http://rpython.readthedocs.io/en/latest/rpython.html http://rpython.readthedocs.io/en/latest/rpython.html > it supposedly is faster than python's C implementation Only if its JIT compiler gets a chance to trace and compile some code which is then executed often enough to make up for the overhead.
- shakna 10y agoDepends on what you define as interpreter, as RPython, the language that PyPy uses, actually has a VirtualMachine, turning PyPy more into a bytecode interpreted language... Which some people argue isn't a straight interpreted language.
- tyingq 10y agoThere's a php implemented php->AST parser here: https://github.com/nikic/PHP-Parser https://github.com/nikic/PHP-Parser