3 ms·
A bit off topic, I like his JS style [1], almost doesn't look JS.. [1] https://github.com/mcsoto/LogicJS/blob/master/logic.js https://github.com/mcsoto/LogicJS
by galfarragem 10y ago
A bit off topic, I like his JS style [1], almost doesn't look JS..
[1] https://github.com/mcsoto/LogicJS/blob/master/logic.js https://github.com/mcsoto/LogicJS/blob/master/logic.js
- itslennysfault 10y agoewwww_snake_case
- troym 10y agoiAlwaysStartGreenFieldJavascriptWithCamelCase_but_then_comes_the_json_and_all_is_lost.
- tracker1 10y agoYou've hit on one of my pet peives with JSON as a transport... likewise with PascalCase from java and .net projects. I tried using snake_case once to placate some PHP, and other guys, but in the end it would have been better to just use camelCase from the beginning as it wound up pretty alien in every environment.
- dsego 10y agoActually, this is the canonical JS with prototypes. The more common style nowadays is to (ab)use the module pattern.
- csallen 10y agoI think the parent is referring to the particular stylistic decisions that differ from what's most common in the JS community. The author uses tabs to indent (instead of spaces), snake case (instead of camel), no semicolons, etc.
- dsego 10y agoWow, didn't even notice that. Now that I look at it, it does seem more airy and spacious. The style is also a bit eclectic and unsound. Dropping the curly braces on that else on L698 irks me to no end.
- galfarragem 10y agoThis style could be called 'No fear JS' :)
- lobster_johnson 10y agoLooks like perfectly ordinary, old-style, prototype-based ES5 to me? Formatting is a bit idiosynchratic, of course (e.g. lines starting with comma).