On Mar 7, 2015, at 11:12 AM, Richard Gaskin wrote:

> Michael Doub wrote:
> 
> > On 3/7/15 1:35 AM, Richard Gaskin wrote:
> >>
> >> What value is being added to the library user with "__"?
> >>
> > I originally did this because I thought it would avoid name space
> > collisions.   I thought that I would receive feedback if folks
> > thought it was a bad idea.   As you can see, it is extra work and
> > it is easy for me to make a mistake.
> >
> > I would be happy to remove them if folks would find it more useful.
> > Please just let me know.
> 
> Such mistakes are easy for all of us, so I'd vote for simplicity.
> 
> Many name-space issues go away with v8, but for now if we feel there's a risk 
> of folks using an existing function named PowerSource we might consider 
> prefacing it with the initials of the collection ("ml" - it's Master Library, 
> yes?), so it could be:
> 
> get mlPowerSource()
> 
> FWIW I appreciate efforts to distinguish getters from setters by including 
> "get" as part of a function name, but it becomes odd to read things like:
> 
> get getPowerSource()
> 
> Personally I believe that being a function makes its role as a getter 
> implicitly clear enough as-is.

Good point. I guess this never occurred to me because I never do "get …", I 
always do "put … into varName". The "it" variable is somewhat ephemeral if 
you're not careful. Even with an "ask …" I always follow it with a "put it into 
varName" before proceeding, so I don't overwrite "it" later inadvertently.

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to