Blog‎ > ‎

Ruby

posted Nov 9, 2009, 6:52 AM by Thanh Nguyen
I have to submit paper reviews about programming languages as part of the CISC860 course with Dr. Jim Cordy at Queen's. This week I read about Ruby. I got to say, it is a very smart language. Everything is object so you can enjoy the OO feature of Java or C++. But it is a scripting (interactive) language so you won't have to spend hours and hours setting up variables and deal with control flows.

What is really neat about it is mix-in and individual method prototyping. With mix-in, you can define code regions as modules. Then you can include these mix-in to form classes. This separation from class and code is wonderful if you are a Java programmer. You can reuse code without creating subclasses. You can also decide at run-time which methods or variables should be in the class. This is handy for separation of concern. With method prototyping, you can create methods for individual objects. So you don't have to edit the class file every time you need a special function (compactness). This also keep the code very close when you need to do event-handling (locality).

More reading at:

Comments