HTML and compilers

This question is more discussion oriented, which asks a simple question. Writing basic HTML is simple, but writing fast light standards based on SEO recommendations, all browsers compatible with HTML pages are complex and time consuming.

But why is it difficult?

In my opinion, because of the hundreds of different rules that you must follow, it’s hard to understand what is hard to remember, and even if you remember that it’s hard to combine them together in a contradictory form and the only way to confirm your work is loaded in every browser that you support and check each scenario.

But this really looks like a problem that we had in the past in other areas of programming, before the invention of high-level language programs written on an assembly was very similar to writing HTML files, you had to remember hundreds of different rules to ensure operability and ensure correctness etc., and the only way to verify them was to execute the program.

In other areas, this problem was solved by high-level language compilers that simplify the syntax, do performance optimization, and check the syntactic correction of programs before execution.

Don't you think that we need another simpler language for writing web pages and a compiler that can create a specific browser, a standard patch size optimized for HTML, from this language?

Do you consider it possible to create such a language and compiler?

+3
source share
8 answers

I am a little afraid. The fact is that writing good HTML is easy. Very simple. Writing bad HTML is also very easy, but neither here nor there.

What is difficult, I think, you will find, writes good, cross-browser, beautifully designed CSS. It is actually very difficult.

And no abstraction will solve this. This will only help efforts to improve all browsers; and this is not a small feat.

, , , HTML , ; , , "" , HTML JavaScript, "" (, , ).

; , "", . .

; . , , .

+6

, "" HTML , HTML. , , .

, , , .., .

+4

, , , , HTML-.

+2

, , , HTML.

HTML, . - , "<html> <head> ... </head> <body> </body> </html> . , PHP, - .

, , , (HTML) () (). , - , .

, , - , - . - /, , / , , MVC .

. XUL, Mozilla; Prism, . Google GWT NaCl, "" . imho , . , - 1) , 2) .

+2

, , , , .

.

0

, . ? , ( ). IMHO, : , O (n²), O (n) .

: , - - , . , - ( ) , HTML, , , /CMS. , - HTML , , - -langauge ( ).

0

HTML-. , HTML + CSS , , .

, HTML CSS , , , . , , . Joel:

youre , theres one , , :

0
source

GWT, Dojo, and ExtJS do exactly what you describe. Yes, they require javascript, but they allow you to avoid remembering many of the “rules” (more or less depending on technology).

GWT is a good example because it doesn't even require you to do any HTML, CSS, or JS at all. You live in pure java land, cross-compiling in a web application, and it just works.

0
source

Source: https://habr.com/ru/post/1712417/


All Articles