That's an architectural quirk of jQuery - it's their whole chainability paradigm - everything returns a configured instance of jQuery.

It works well in JavaScript, but I can see how it wouldn't work well in a typed languge. That said, jQuery's chainability paradigm is not my favorite, even in javascript. I often feel like all I really need from jQuery is Sizzle (the selector engine it's based on), and some of the compatibility shims it contains (event normalization).

Kevin N.


On 12/2/11 8:10 AM, Andrew Sinning wrote:
What I don't like about the haXe-jQuery API is that every object has
type "JQuery".  It seems to be it would be much programmer-friendly if
there were sub-classes for the individual elements.  Imagine if in AS3
you could never specify any display object to be anything more
specific than a Sprite or an Object.

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to