Ruby and the Interpreter Pattern
For my Software Design and Architecture course, the students are taught mainly (for now) design patterns, which are meant to show programmers the correct way to address common problems every programmer will face through their entire career. Personally, there were many which I knew (for example, the adapter pattern) but they were formally introduced later on.
For our Compiler Design class, we are using and leveraging the C programming language in order to build our first compiler of the Drac Language. In my case, for the Programming Language course we learned Clojure, a relatively new language based on Lisp. What is interesting about the article Ruby and the Interpreter Pattern is that Ruby is used in order to explain some programming technical concepts necessary for the course. When learning a new language, like Clojure, I consider that the first question to be asked should be:
Why learn x language?
Additionally, this answer is complemented with the benefits of the language and their use cases. For example, Data Science and Machine Learning is a field where many programmers use Python or R. Web Development, Javascript (sorry PHP will miss you). Moreover, to finally explain and prove why this language is efficient in x thing we have to dive in some of its architecture and design. Learning how a programming language works and applies its data structures helps you understand the concepts, as it is mentioned in the article.
To conclude, learning about compilers and interpreters is not necessary for the ones who will dedicate their entire life to make new compilers. In my own experience, I would say that I learned more about recursion and how it is used by the recursive descent parser in the syntax analysis. Also, how we can reduce the size of our code using more elegant data structures like hashsmaps and sets.
Comentarios
Publicar un comentario