Ruby and the Interpreter Pattern
For this time the article that we had to read talks about an interpreter Framework developed by our professor Ariel Ortiz using the Ruby language.
I have use the language before but just for some few ideas and quick aritmethic operations. In my opinion it is a friendly and nice language. I'd like to investigate more about but i have a mess of programming languages in my head right now … maybe soon.
I remember that everything in Ruby is an object (I forgot it but then, when i was reading it comes to me), including: strings, numbers, arrays (lists), hashes (maps or dictionaries), symbols, procedures (closures), and even classes.
Going back to the article,first, why Ruby? Ruby is an interpreted, dynamically typed programming language, that helps simplifying the construction on languages interpreters, more specific it has the advantages of having garbage collection, open classes, first class continuations, built-in regular expressions and hashes.
The article is mainly about the S-expression Interpreter Framework (SIF), In general way a S-expressions are a parenthesized prefix notation, mainly used in the Lisp family languages because it's origin lies within the Lisp family of programming languages whose entire syntax consists of those expressions.
Is also mentioned the article “The S-expression Interpreter Framework (SIF) provides the basic building blocks that allow writing interpreters that can easily be studied, extended and modified”, it is actually really useful and can be used in various ways in language design or/ and implementation.
In my experience the Lisp descendants are at the beginning hard to learn but with practice the lines are less and has lots of easy ways to do the same actions with less problems.
Reading a little more explains that SIF implementation was made to define languages using this notation easily (not for me but in general cases), but it also can be used to define other programming styles like imperative or object oriented.
Reading it was really interesting and it explains some doubts i had.
No hay comentarios:
Publicar un comentario