Properties: The New Variables
briankardell.wordpress.com
briankardell.wordpress.com
I could not dislike the 'my-' prefix any more. Can we please as an industry of professionals decide to talk about things without having to baby talk it into a who's-on-first routine? Talking about variables in the first person possessive is difficult when the 'person' we are talking about owning it is an abstract block of code. In this proposal it is 'author defined' but really when I read your code, It is yours… and now it's mine… or maybe it's ours. Or perhaps it belongs to that block of code. What doesn't change is that it's a variable (or property).
I know that's probably a minor point but it annoys me.
Secondly, I think the $() syntax needs to be weighed against the cost of having nesting there. Is $ not enough to indicate a reference? I guess the idea is to use that to provide a default but I don't like having to always type out the parens for it.
Why do you think the term 'variable' is the source of confusion and 'property' is better? If so, why not use a 'prop-' prefix?
The more discussion and argument the better IMO.