I'm glad Robert brought up this subject.   I asked about this on IRC a
while back and the answer was that prototype was "hand-crafted", is
beautiful the way it is, and that modifying it to pass strict syntax
checking would somehow make it slower...

I agree that there is some beautiful code in prototype but that's not
a good enough reason for not being able to use jslint to find real
bugs.  And this issue is especially painful when I'm passing a large
file consisting of several concatenated scripts to jslint ... since
many of them rely on prototype, and it's at the beginning,  I cannot
see results for my own scripts because jslint will stop after too many
(harmless) errors in prototype.  For now, I'm running the various
scripts through jslint separately.

My justification for cleaning up prototype's code is that in some
places the craftiness exceeds utility, and that prototype's
awesomeness will only increase if the source code also passes basic
software quality tests.  For example, a statement like var result =
value1, value2;  there's really no need to use the comma operator with
an assignment.  Only one of the values will be assigned, and it's
better to move the side-effect code into a separate statement where it
will be easier to read.  There are volumes written about avoiding
errors by not writing code like that in the first place.  You either
believe it or you don't, I guess.

If the core developers aren't interested in anyone contributing
"strict fixes", does anyone have thoughts about maintaining a separate
strict version of prototype?   Either way I volunteer to make a first
pass at it.
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to