Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxLANWeb : the magic fox lives on both LAN and Web!
Message
De
04/11/2010 05:54:09
 
 
À
03/11/2010 09:28:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
01466562
Message ID:
01488151
Vues:
149
>>Far more powerful: It gives you even more possibilities, that is true. Monkeypatching (assigning functions to specific instances as "methods" allows some interesting things - but "more OO" ? You can/have to define your own object description pattern - is that what you mean ?
>
>Another cool feature about Javascript is the automatic type coercion, which makes it 'untyped' rather than 'loosely typed'.
>For example, whenever you need to know if an object has a property or method, you don't need Pemstatus() or equivalent, you just code:
>
>if(myObject.method){ // myObject.method automatically coerces to a Boolean
>  myObject.method();
>}
>
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 ;-)
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...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform