Ruby and the Interpreter Pattern

 This week, we read an interesting article by our very own professor Ariel Ortiz titled Language Design and Interpretation using Ruby and the Interpreter Pattern. I'm not going to lie, there were some parts of the article that I couldn't quite grasp, which could probably be easily fixed if I spent some more time going back over it a couple of times. However, I got the main idea, so I think I'll be just fine. 

The article mentions using the S-expression Interpreter Framework (SIF), written in Ruby, in order to introduce different programming paradigms and concepts. The reason Ruby was chosen is stated clearly: building an S-expression interpreter can sometimes be too easy (though as someone who took this course using Clojure, I can say that it's more often hard), so building it with an object-oriented language would provide more of a challenge and a better understanding of the core concepts, alongside teaching students a popular OO language. 

While it's not directly related to this course, it's nice to see how the different patterns we're looking at in the Software Design and Architecture course can be applied. On a more related note, it's interesting to see the similarities between the syntax analysis required for this process and the design of our compiler, and I'm sure it will provide students with a deeper understanding of the underlying workings of the language, which in my eyes, is nothing but a positive. 

I don't (and can't) really give my opinion on how effective this method is, because I wasn't taught using Ruby, I think it's great to explore all these different methods, and I would love to give a shoutout to our professor for always trying (and succeeding) to make our classes different for the rest, and for really taking an interest on our understanding of the concepts. 


Comments

Popular Posts