TheSwanFactory / self-service-kiosk

Opening up kiosk creation to everyone
MIT License
1 stars 2 forks source link

Rename 'get' to 'call' #29

Open drernie opened 9 years ago

drernie commented 9 years ago

Sorry to be nit-picky, but I have 'get' hard-wired in my brain to be a scoped accessor. :-/

Conceptually, I think of what you are using 'get' for actually represents call-ing the object to get its value. If this was ruby, I'd want them to be actual lambdas; but I'm not sure that's a good idea in CoffeeScript.

Is that reasonable?

danielma commented 9 years ago

curious: why should it be a lambda? what would that accomplish?

my hesitation with using call is that in javascript call is something you do to a function to execute it. you can literally use (function() {}).call() to execute a function.

I chose get because it is an accessor. It's the accessor for the plain javascript object that the World wraps

drernie commented 9 years ago

Perhaps I'm confused. Could we use the term 'value' or 'contents' then?

Sent from my iPhone

On Jan 6, 2015, at 20:51, Daniel Ma notifications@github.com wrote:

curious: why should it be a lambda? what would that accomplish?

my hesitation with using call is that in javascript call is something you do to a function to execute it. you can literally use (function() {}).call() to execute a function.

I chose get because it is an accessor. It's the accessor for the plain javascript object that the World wraps

— Reply to this email directly or view it on GitHub.

danielma commented 9 years ago

ah, yes. value seems good to me