>Personally I find objects having hasAttr()-Functions more readable and in combination with callable() even better - but here I venture into syntactic sugar area. The explicit possibility to overwrite the internal "magic" methods in python perhaps just fits my brain better ;-)
Exactly like you at the beginning, then got used to it and liked this coercion stuff as very intuitive and readable.
if (myObj.myMethod) // commonly used syntax
if (myObj['myMethod']) // alternative syntax quite similar to if (myObj.hasAttrib('myMethod'))
>Really astonishing is the performance of V8 reached with such a free-wheeling language as JS, so I have it more on my radar than in the last decade...
Glad to read that. JS deserves much more than its reputation.
To make it sure, just
view source of a facebook page .... it's 80% javascript.
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/Never explain, never complain (Queen Elizabeth II)