Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : If observable = new can.Observe(foo); then Chrome shows that observable is a Constructor and can be confusing

$
0
0
Well, I think it is the fundamentals of programming that

1) try to use good names for your variables, class name, etc, etc, if it can help in understanding the code and in debugging and maintenance for yourself and others.
2) if there are ways that the naming or confusion can be created, opt for the method that won't create the confusion.

instead I am hearing, "Why should you care about good naming, bad naming, whatever naming."

@Curtis instanceof can give a hint, but are you going to try   instanceof Animal => true, now let me try instanceof Dolphin => false, now let me try instanceof Dog => true, but wait, Dog? who cares, maybe it is the same as Person...  also, just that it is true doesn't mean that it is the class.  It can just be a base class and instanceof will return true.



Viewing all articles
Browse latest Browse all 3491

Trending Articles