Hacker News new | past | comments | ask | show | jobs | submit login

Actually a language compiler is more complicated than a web server when speaking about the data-structures and the algorithms used

That would depend on how much of the web environment you want to reproduce and what language we're talking about. The original Oberon fit into some 5500 lines of code, if I'm not mistaken. That's sort of smaller than Apache httpd. It's even smaller than nginx and lighttpd. And we're still talking about pretty weak languages, have you seen some of the self-hosting metacompiler stuff? (META-II, TREE-META, OMeta etc.) Don't forget that the design of the reference Go implementation is actually pretty close to the Oberon tradition of making things simple.




In terms of lines of code, I'm sure that things like OMeta are pretty small, but that doesn't mean the implementation is not complicated. And I'm not that familiar with the *Meta stuff, but AFAIK that stuff is just the frontend, whereas on the backend (the logic for generating the machine code / bytecode) things can get messy and complicated.

Also, I'm sure that the Go implementation is right now simple, but every mainstream compiler quickly evolves towards doing more and more AOT optimizations, like for performance or for better error messages. Again, performance optimizations can get really complicated and messy.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: