4 ms·
I don’t really care how easy it is to parse for a machine. I want it to be easy to parse for me. And HTML5 is plenty easy. GP is right, JSX is a weird bastard c
by IgorPartola 8y ago
I don’t really care how easy it is to parse for a machine. I want it to be easy to parse for me. And HTML5 is plenty easy. GP is right, JSX is a weird bastard child of two languages that is very awkward.
- majewsky 8y ago> I don’t really care how easy it is to parse for a machine. I want it to be easy to parse for me. So instead of writing code, you just want to write a natural-language description of what the program should do?
- enraged_camel 8y agoThis sounds like a very bizarre strawman version of what the parent is saying. No, obviously the desire is not to write code like one writes natural language. But ease of reading is an extremely important quality to have in programming languages. Programmers read code way more often than they write it, and them being able to make sense of it is crucial.
- IgorPartola 8y agoWhat enraged_camel said. Machine code is easy to parse. Yet we don’t optimize our tools for that. Readable code is more important than parsable code in most cases.
- hiccuphippo 8y agoI find it difficult to parse for me when a tag doesn't end. The browser has a very specialized parser that can figure out if a ul after a p is inside it or is the p implicitly closed at that point, but I can't figure that out myself. So I welcome the X in XHTML, it keeps the syntax sane.
- Zarel 8y agoTo add on to hiccuphippo's comment: By "easier to parse", I mean "easier to parse for humans as well as computers". I, a human, would also prefer not to memorize the list of self-closing tags, or the arcane rules for when <p> and <li> autoclose. Not having to do these things _blatantly_ makes XHTML more readable.
- johnisgood 8y agoAgreed. I was just reading about when to close tags and when you shouldn't... well... it seems arbitrary to say the least. I would rather just close ALL tags, no exceptions.