SIF

 I would not consider the Clojure interpreter implement with Clojure that we saw during the Programming Languages courses as ‘cheating’, but certainly the SIF interpreter does look like a more interesting example. Just that S-expressions make me remember Clojure and I tried to like it, but I could not. While reading the article I became more impressed of Ruby as a programming language as it has some really interesting features such as the code blocks that I would like to learn better because I do not understand them completely, that every class even the base classes of the language can be easily modified, or that you can modify classes mid program although that one I am not sure in which situation would be used. Overall, I am enjoying Ruby a lot more than Clojure.

The exercise sounds like a good way of improving object-oriented programming while better understanding interpreters and the particularities of Ruby, although the choice of Ruby as the programming language seems kind of weird in the course that we are using C#, instead than as an exercise for the course where we are using Ruby. I am not sure if I misunderstood the interpreter pattern, but unlike previous patterns that solve a particular problem that can appear in multiple programming contexts this one seems too specialized. Like really useful in this specialized type of programs, but I cannot think of applications in other kinds of programs.

I find it impressive that SIF can be changed from a functional language to an interactive language by only adding two special forms and adding a new class. Which by briefly looking at the example the special form and the environment class are shorter than I expected. Personally I prefer imperative languages over functional one, but maybe I haven’t encountered the right situation for functional one to shine.

Comentarios

Entradas populares de este blog

Internals of GCC

Relevant Compilers design for students