Ruby and the Interpreter Pattern


The SIF is a tool that teacher Ariel uses to help students learn about design and implementation of programming languages. It is useful for us as students because it let us know how an interpreter works and how is it designed to translate from that framework to Ruby language and to implement any function we want the interpreter to do.

   Even though the interpreter is quite small, it has enough functions to let us know how it identified variables, functions and does evaluation to create the procedures, functions or statements we want. We can create add new functionality by following the rules described by the article to test how does the functional, imperative and object-oriented programming styles work and to test the variable scopes and continuations.

   I believe this kind of approaches to language programming let us see more than we usually do by reading books and programming applications while we learn by the documentation because we can, literally, design the way que programming language is doing things, change the way it works and find new ways to make it more easy to understand, or more compact, or more efficient. By using this framework, I believe we can understand, deeply, the way not only interpreters, but compilers work by identifying the elements that compose the instructions.

   Finally, I’ve seen many programming languages from C, C#, Java, Python, Clojure, Erlang, Javascript, and many others but sometimes I cannot understand why the programs I write do weird thinks. I believe this is because of my lack of knowledge about its implementation and rules. I think this framework is useful now but making it with other languages such as Clojure or Erlang, that I believe are the weirdest I’ve known, would be interesting an interesting challenge for the new generations of programmers. Especially Erlang because of the need of concurrent programming nowadays.

Comentarios

Entradas populares