Re:LogicJS adds logic programming to JavaScript
by dsego on Monday August 15, 2016 @05:27PM
(#12293601)
Actually, this is the canonical JS with prototypes. The more common style nowadays is to (ab)use the module pattern.
Re:LogicJS adds logic programming to JavaScript
by csallen on Monday August 15, 2016 @05:43PM
(#12293711)
I 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.
Re:LogicJS adds logic programming to JavaScript
by dsego on Monday August 15, 2016 @06:10PM
(#12293871)
Wow, 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.
Re:LogicJS adds logic programming to JavaScript
by galfarragem on Monday August 15, 2016 @06:41PM
(#12294060)
This style could be called 'No fear JS' :)
Re:LogicJS adds logic programming to JavaScript
by gavinpc on Monday August 15, 2016 @11:16PM
(#12295314)
Not even using a linter. See the bug?
Re:LogicJS adds logic programming to JavaScript
by wbercx on Tuesday August 16, 2016 @08:32AM
(#12297004)
Ha, good get.
Re:LogicJS adds logic programming to JavaScript
by lobster_johnson on Monday August 15, 2016 @09:14PM
(#12294822)
Looks like perfectly ordinary, old-style, prototype-based ES5 to me? Formatting is a bit idiosynchratic, of course (e.g. lines starting with comma).
Re:LogicJS adds logic programming to JavaScript
by itslennysfault on Monday August 15, 2016 @05:25PM
(#12293591)
ewwww_snake_case
Re:LogicJS adds logic programming to JavaScript
by troym on Monday August 15, 2016 @05:38PM
(#12293674)
iAlwaysStartGreenFieldJavascriptWithCamelCase_but_then_comes_the_json_and_all_is_lost.
Re:LogicJS adds logic programming to JavaScript
by tracker1 on Monday August 15, 2016 @06:21PM
(#12293941)
You'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.
[1] https://github.com/mcsoto/LogicJS/blob/master/logic.js