Hi Sven!

We won't change the way the source code is formatted, as we like it  
the way it is. Most people take a short while to "switch over" from  
more traditional JavaScript source code formatting, but once you've  
made that step the code is pretty easy to read.

The basic rules governing the style are conciseness and overal code  
beauty (of course, beauty lies in the eye of the beholder, so YMMV).


Am 04.10.2007 um 13:07 schrieb Sven Klose:

> I´m new to the source code, and had big trouble reading it. With the
> right indentation one could spot constructs immediately, but actually,
> the code is so compressed, it takes ages to even figure out where a
> function starts and where it ends, to spot if-statements and variable
> declarations, and so on.
> Some suggestions in detail:
> - dedicate a whole line for an opening/ending brace of a function if
> it doesn't contain just one statement,
> - keep the width of lines small,
> - declare only a single variable in a var-statement,
> - have indented conditional blocks, instead of squeezing an if-
> statement into a single line,
> - use distinct variable names, not 'Method' and 'method' in the same
> function for example,
> - use TABs, so all this all can be done without increasing the code
> size, and one can set the indentation width to suit his/her needs,
> - add more comments :)
> Your visual perception can spot the overall structure of code at once.
> Please keep it stupid for the likes of me. ;) I'd do the reformatting,
> if desired.
> However, I find the use of spaces and empty lines very good already.
> Best regards.
> >

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 [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to