On 7/19/06, Ryan Gahl <[EMAIL PROTECTED]> wrote:
No, that is far from clean, much less cleaner than prototype. You mean init
as in like, a consistently named constructor across classes? So if I look at
class y, and class x I can easily see which method is the constructor for
the class, and you mean to say that's, like, unclean?

It should be fairly easy to see the constructor. It is the function
with the a capital letter and the name of the class you wish to
instantiate. This is how JavaScript works. Using init adds an
unnecessary layer used when a developer doesn't know how to chain
prototypes correctly. Java has a way of initializing objects. It is
using the constructor. Use it.

Are you serious?

Yes I am absolutely 100% serious. It makes good sense to use the
JavaScript constructor function to do what it was intended to do:
construct objects. The extend function make it convienient to then
chain the prototypes and constructors with minimal effort.


Just say "I prefer procedural programming over object oriented, and thus
like other libs over proto because I don't need clean consistent class based
object oriented js code"

This is opposite to how I feel. I like OOP just fine. The link I
provided shows how effective the extend function is to emulate
class-based inheritance in JavaScript doing it the most tidy
JavaScript way.

Peter
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to