On Sun, Jan 2, 2011 at 12:17 AM, jemptymethod <jemptymet...@gmail.com>wrote:
> On Jan 1, 10:08 am, jmulligan <jason.mulli...@avoidwork.com> wrote: > > I do something similar with my lib (http://github.com/avoidwork/ > > abaaso) that's under dev. It works well, but you can't use private and > > public. they're reserved. > > That's why I slap "$" on front of private and public. > > Instead of $ (dollar) prefix, you could also _ (underscore) prefix private methods. That way you don't have to artificially grow your (public) method names with php-like ugliness. I personally use the $ prefix for variables returned by libraries like jquery or prototype. To easily distinct those from regular dom (or other) vars. I think the underscore is kind of the js-way, but I don't really have anything to back that up so somebody might correct me on the issue :) Whenever I see $ prefixed vars, and they're not clearly used to distinct var contents, I usually suspect a php user. Especially if they don't use `var` :p - peter -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Google archive, visit here: http://www.mail-archive.com/jsmentors@googlegroups.com/ To unsubscribe from this group, send email to jsmentors+unsubscr...@googlegroups.com