Skip to content

Comment on Python: Writing a Compiler and Interpreter in 160 lines of code

Comments

Nice code, but that's not a compiler.

Indeed. And, given the "XX in less than YY lines of code" framing of the title, I was actually hoping for something a little more along the lines of clever code. This this is a pretty pedestrian interpreter, honestly. It's not bad code, just ... exactly what I would expect an interpreter for a tiny language to look like.

Agreed. It's a nice college freshman first project.

Hmm, a compiler it may not be, but I doubt many college freshmen could do this as a first project.

The final project for everyone in my intro course was to write a LISP interpreter. Have we fallen so far?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.