0

Hi guys,

I am new to ruby i already have an experience in the core php and zend framework.I need to clarify the below doubts,

Is oops in ruby is completely different from other oops concept languages like java,c#.

Can you pls help me out.

Thank you,

Regards,
Premnath

Edited by pritaeas: Removed spacing

2
Contributors
1
Reply
20
Views
4 Years
Discussion Span
Last Post by sepp2k
1

What do you mean by "oops"? I assume the oop part stands for Object Oriented Programming. What does the s stand for?

Anyway object oriented programming in Ruby isn't fundamentally different than in other languages, though obviously the fact that Ruby is dynamically typed and otherwise also very dynamic makes it quite a bit different from C# and Java in general. It's object orientation is also much more inspired by small talk than the languages you mentioned, but that affects the terminology more than anything else. It's also different from Java that every value (including integers) is an object with methods.

The exact semantics of private and protected methods also differ from those in C# and Java. Specifically private in Ruby means that a method can only be called on the current object (and not on other objects of the same class) and protected means that the method can also be called on other objects of the same class (or a subclass). You can always access superclass methods from a subclass even if they're private.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.