News for hackers. Stuff that matters.

PhiLho

Re:Hjson, the Human JSON on Friday April 15, 2016 @06:53AM (#11503367)
Yes! There is the same ambiguity in Yaml, so syntax highlighters of the format don't agree where a string ends...

The site even has an ambiguous example: three: 4 # oops Well, is that "4 # oops" or 4? I saw no rule about ending comments, and they say that three: 3 times is a string.

I have seen no formal specification of the grammar, so we already have lot of ambiguity. Good luck to implementers...

Seriously, removing the "no quotes needed" rule would improve greatly the format. If you want to include HTML with double quotes literally, just use the multiline string format and be done.

Re:What is a coder's worst nightmare? (2014) on Monday November 23, 2015 @07:30AM (#10614201)
Alternative links:

[2] http://lhorie.github.io/mithril/ (using its own virtual Dom); I think there are other implementations around, too.

[3] http://cycle.js.org/ (have a native driver)

FYI.

Re:Constantly Confusing ‘const’ on Tuesday September 08, 2015 @05:17PM (#10188254)
One advantage const can bring (at least when used with primitives or frozen values) can come from JS IDEs: if they detect a value is const, they can report its value when hovering the variable name, in a static way.

That's what Java IDEs do with static final variables.

Re:JavaScript's world domination on Wednesday March 25, 2015 @02:21AM (#9261553)
Don't forget Basic! Lot of people learned to program with it, and did cool things with it, in the times of 8-bit computers. And it is still used, from DarkBasic and similars, to MS' variations on VisualBasic (VBA and such).

You can make smart, high level languages like Haskel or Ceylon, but people will generally prefer dumb, easy to learn languages like Basic, PHP or JavaScript, despites their limitations.

Result: instead of making a nice car, well designed and looking good, they put big wheels and powerful engine on soap box cars! :-)