expressjs / express

Fast, unopinionated, minimalist web framework for node.
https://expressjs.com
MIT License
64.31k stars 14.58k forks source link

Refactor to Use Standard JavaScript Conventions #277

Closed bentruyman closed 14 years ago

bentruyman commented 14 years ago

Much of the coding style in Express looks as though it was inspired Ruby (lack of semicolons and braces around one line if-statements, 2-space tabs). This deviates greatly from most other JavaScript projects, thus making it difficult to contribute code.

For more information, Douglas Crockford wrote up a set of "Code Conventions for the JavaScript Programming Language": http://javascript.crockford.com/code.html

tj commented 14 years ago

its not going to happen. Client-side js is an argument, but for SSJS there is no point to make code ugly by following Douglas Crockford. I am fine with taking contributions and re-styling them to follow my conventions

bentruyman commented 14 years ago

My comment was not made in the context of JavaScript minification, or that I put Crockford up on some pedestal. One of the huge benefits of SSJS is the lack of a large context switch between the back- and front-end. Realize that many of the developers you'll be attracting have been using relatively the same conventions for the past 5 to 10 years and aren't going to change their environments to start using 2-space indents just to make their potential patch readable. Imagine I started writing Ruby and all my function signitures had parenths and I used a tabbed indentation because I preferred it, while ended each line with a semicolon.

I don't mean for this to sound personal. I really love the work you've done so far and I'd hate to see other eager developers reluctant to contribute directly because of some minor style differences.

Keep up the good work.

tj commented 14 years ago

thanks. like I said I totally understand what your saying, so I am fine accepting commits and re-styling