3 ms·
I understand how it all works mechanically, I just don't think it models the real world conceptually. OOP works well when you make classes to represent fundame
by montroser 5y ago
I understand how it all works mechanically, I just don't think it models the real world conceptually. OOP works well when you make classes to represent fundamental nouns, those nouns with properties describing their existential makeup. But day.ago is not that -- it's just abusing the syntax to fake a natural looking expression.
On finding out where a method came from, I appreciate that I can look to see if it's core or else must be from a gem, but I want to know _which_ gem did it come from.
- gls2ro 5y agoI don't try to convince you to like Ruby, but I don't really understand how you can know in other languages if something comes from a plugin or not by simply looking at it and not knowing the std library or using an IDE. Maybe in the case of a language with a very small standard library, this could be easy: as the best assumption could be that it is in a plugin/module. But I think looking at a piece of code and direct knowing from _which_ plugin some methods comes from has more to do with naming conventions than with the language itself, especially in languages where either overriding or overloading or a form of them is possible. In the case of Ruby, I recommend RubyMine and just to go to definition. 99% of cases it will correctly open the definition from the gem of std library. I agree that in Ruby - maybe more than in other languages - one can really make some behaviors hard to discover. But most of the libraries are straight forward and Rails is very well documented in code. I usually prefer to just go to the definition and read the method than browse the API docs.