Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which Development Language/Tools?
Message
From
05/01/2012 13:38:13
 
 
To
02/01/2012 17:08:47
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01531253
Message ID:
01532233
Views:
87
Hi Thierry,
>Issue 4 is just ... false,
>global variables don't exist in JavaScript.
>a non-declared variable is coerced to a property of global (window in the browser) object.

which in essence is the same as having an entry in the top NTI
if comparing to vfp and running into issues
with unintended non-privatized variable writes.

compare that to the sane design of python:
undeclared vars are always local to the function
you *can* declare them to be module-global
you can modify other module-globals by specifiying the module.

the design *protects* you but you still have the option
to specify the more "dangerous" but sometimes needed things.

I have not followed the search for setter/getter and private properties
to know them by heart, but from articles by Crockford or Michaux
it seems it is much more effort than the elegance of the vfp _access and _assign,
which are similar to python properties - the design here is much better than
the usage in C# and Java, even if annotations can reduce the noise there...

There are some warts on every language
(we just are habituated to the vfp ones better than to others)
and acknowleding that fact is not saying JS is unusable or bad,
but in some things I'd prefer a less hasty and helter/skelter
design and "reference" implementation to have happened ;-))

regards

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform