3 ms·
Writing compiler in normal, high levels langs is non trivial, I do wonder how this CPU code looks like
by hardware2win 4y ago
Writing compiler in normal, high levels langs is non trivial,
I do wonder how this CPU code looks like
- pjmlp 4y agoDepends on what you pick. ML, Lisp, and Logic derived languages are all relatively easy. Hence why on my degree their were forbidden for compiler assignments, even though we had a strong ML and Prolog set of lectures in programming languages I and II, LP II. We were supposed to earn the compiler design assignment, from the professor´s point of view. Although the year I took it, it was about the time Java was being introduced, so doing it with Java, SableCC while not as easy wasn't that harder, specially following alongside the Tiger book.
- kazinator 4y agoWow, that is awful. For compiler writing, you should use a good language for that purpose, so that the hard parts of the program are the actual compilation algorithms, not debugging segfaults in a graph structure or whatever, or wasting time on electricity-and-running-water infrastructural code whose existence should be taken for granted. There is plenty of "cred" to be earned without that; you can still be pulling your hair out debugging a compiler written in Lisp, find years-old bugs in it and so on. I don't know anything else about your ex-prof other than what you have in the comment, but based on that, my Ouija board's planchette is edging toward "insufferable asshole". Mental note: be sure not to be that guy if you ever turn professor.
- pjmlp 4y agoUnfortunately universities are full of such folks. Our Physics III was even worse, it was one of those that was proud of hard it was to go through his final semester exam. Thankfully they tend to be a minority, I also met several that became an a good example of how teaching should be like.