How to read a method call
I have a mostly vocabulary-related question, concerning method calls:
when you have a code such as
dog.sit()
Would you rath开发者_开发知识库er say that you "call the sit method of dog" or "call the sit method on dog?" and why?
Thanks ;)
Given the choices you provide and in the case you gave, I would probably say "on" because it's being called on a specific instance. If it were a static method at the class level, then I would probably use "of". But in reality, I say "call dog dot sit" when I'm actually talking to someone ;)
Don't make people think. Just say what you see dog dot sit
I would say either "dog dot sit" or "dog, sit"
精彩评论