binary method or keyword with one argument

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

binary method or keyword with one argument

Mark Volkmann
Is there a rule of thumb for deciding whether a method that takes one  
argument should be implemented as a binary method or a keyword method?  
Do you only use binary when the method is like an mathematical  
operation?

---
Mark Volkmann




_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: binary method or keyword with one argument

Bert Freudenberg

Am 28.09.2008 um 17:09 schrieb Mark Volkmann:

> Is there a rule of thumb for deciding whether a method that takes  
> one argument should be implemented as a binary method or a keyword  
> method?

If in doubt, use keywords.

> Do you only use binary when the method is like an mathematical  
> operation?


Yes. And for very common/general operations ("," or "->" come to mind).

- Bert -


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners