/developer|entrepreneur/i
Always looking for new developer talent, even those with zero experience, as you never know who's got the potential to become a great developer.
Methods as defined on a class, module or object directly are part of that object. They don't exist independently except when referenced with things like Method. I'm not sure this is inconsistent, it's just how it's structured. "Everything is an object, or a property of an object" is a more specific rule, perhaps?
Then there's the question of what method calls are. Are those objects too? They're messages passed between objects, an approach actually different from conventional function calls. Messages can be intercepted, redirected, rewritten and so on at run-time in a very arbitrary fashion, while function calls are often compiled into code as-is, immutably.
What is 1 + 2 in Ruby? The answer is not necessarily 3.
So maybe it should be "Everything in Ruby is an object, a property of an object, or a method call on an object."
Thanks for the response. The more you dig into the language, the more interesting it gets. Messages are an interesting subject and were out of scope of this post. I suppose it’s how you interpret “Everything is an object”. I debated including methods, but was hoping someone could clear it up.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Methods as defined on a class, module or object directly are part of that object. They don't exist independently except when referenced with things like
Method
. I'm not sure this is inconsistent, it's just how it's structured. "Everything is an object, or a property of an object" is a more specific rule, perhaps?Then there's the question of what method calls are. Are those objects too? They're messages passed between objects, an approach actually different from conventional function calls. Messages can be intercepted, redirected, rewritten and so on at run-time in a very arbitrary fashion, while function calls are often compiled into code as-is, immutably.
What is
1 + 2
in Ruby? The answer is not necessarily3
.So maybe it should be "Everything in Ruby is an object, a property of an object, or a method call on an object."
Thanks for the response. The more you dig into the language, the more interesting it gets. Messages are an interesting subject and were out of scope of this post. I suppose it’s how you interpret “Everything is an object”. I debated including methods, but was hoping someone could clear it up.