3 ms·
Of course it is. A friend of mine wrote a C99 interpreter in python in high school. He had the wonderful idea of not implementing any undefined behaviour that w
by bjoli 6y ago
Of course it is. A friend of mine wrote a C99 interpreter in python in high school. He had the wonderful idea of not implementing any undefined behaviour that wasn't strictly necessary :) we used it to test our C code later on in the course.
It probably won't be very fast though. There are parts of C++ that doesn't map very well to common lisp, and which means some parts will have more overhead than necessary.
- sillysaurusx 6y agoC99, sure. C++?
- bjoli 6y agoOf course it is doable. Nontrivial of course. C++ is probably not the language I would start with.
- MaxBarraclough 6y agoVery impressive for a high-schooler. > He had the wonderful idea of not implementing any undefined behaviour that wasn't strictly necessary What does this mean? It sounds like the way an ordinary C compiler works: it ignores the possibility of undefined behaviour occurring, as the C standard allows it to do this.
- bjoli 6y agoI just remember that it crashed if you tried to modify a string literal, which IIRC is undefined. And that it was very diligent about scope. If you had signed integer over/underflow it wrote insulting error messages.