1

I have a mostly vocabulary-related question, concerning method calls:

when you have a code such as

dog.sit()

Would you rather say that you "call the sit method of dog" or "call the sit method on dog?" and why?

Thanks ;)

ms123
  • 581
  • 4
  • 12

3 Answers3

1

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 ;)

Joel C
  • 5,547
  • 1
  • 21
  • 31
1

Don't make people think. Just say what you see dog dot sit

tster
  • 17,883
  • 5
  • 53
  • 72
0

I would say either "dog dot sit" or "dog, sit"

Eamonn McEvoy
  • 8,876
  • 14
  • 53
  • 83