• The principle of least surprise and other features of Ruby

     

     

    According to Yukihiro Matsumoto, he wanted to make a programming language that he himself would enjoy working with. Matz also wanted the language to help programmers be productive and to do more with less. Finally, the language had to minimize surprises. This has evolved into the principle of least surprise, according to which the program should behave as the programmer expects.

     

    As noted above, Ruby is an object-oriented programming language. The phrase "everything is an object" can convey how entities, including primitive ones, are considered in this language. All calculations are performed using methods that are called on objects. For example, to calculate the value 5 + 4, the + method is called on the Integer instance 5 with the object argument 4.


    Tags Tags : , ,