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.
I've heard good things about Mithril performance. I'll need to take a look.
Virtual DOM as a panacea may be overrated, though. Maybe React's just isn't fast enough, but if you use another way to keep track of what parts of the DOM to change, simply pushing things into the DOM can be WAY faster than using a Virtual DOM. [1]
Cycle.JS still hits my "HTML in code BAD" reaction. An example from the front page:
So we're again mixing HTML and JavaScript, and in this case we're also reinventing the syntax. If you're going to mix HTML with JavaScript, at least using standard HTML syntax seems like a better solution.
A lot of popular frameworks are using this generated HTML approach, though (including apparently Mithril). I'm still trying to figure out if my negative reaction is justified.
This is such a superficial aspect of the framework that it's really not worth discussing. You need to go deeper to learn it properly, and only then give verdict. In ClojureScript (Om, Reagent, etc), you have the same HTML building pieces with code. Also in Elm you use normal Elm functions, not a HTMLish DSL. Also, nowadays in Cycle.js we use the more friendly syntax:
That's what it is, just an automatic reaction without any real practical argument. Do yourself a favour and "unlearn" that. Open your mind. You're doing yourself a huge disservice by turning away from new ideas with these knee-jerk reactions. Working with views as functions of data gives you much more than it takes away.
I'm considering doing exactly that (unlearning the reaction). Too many people are agreeing with you for me to ignore it.
On the other hand, every time I turn around I think of more things that it "takes away." This time it's an entire category of tool: The visual layout editor. I like it when my code can be data-driven, and data-driven using a standard format that can be saved using a (visual) tool.
I especially like it when my artists can tweak the page layout for me, but I don't like the idea of giving the artists files full of JavaScript or JSX to tweak.
Are there artist-friendly tools that can edit the layout of a React site/app, where the JSX can be modified in-place using the tool? It doesn't strike me as an impossible-to-solve problem, but it could be tricky to do well.
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.
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! :-)
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.