I've said this before, but I'm tooted to say it again.

Browsers were originally designed to layout and render documents. To handle all the various writing systems, cultural legacy, etc it takes extra effort upfront to do so, but it remains efficient because documents rarely change.

Interactive apps on the other hand tend to be easier to layout and yet change all the time.

Combining the two just gives the worst of both worlds. In terms of performance, and I also think UX.

@alcinnz I agree for the most part. "originally designed to layout and render documents" that was the intention, but clearly, for a language that lacked any and all functionality to handle layout properly, those intentions weren't very well realised in practice until the arrival of at least CSS3.
I still think that style, layout, type, and content are all different things that perhaps could be specified using the same regular language, but without mixing concerns.

@alcinnz As for interactivity, we're probably in agreement that Javascript is a bloody mess.
To be clear, I don't advocate for adding yet another language that deals with layouts. I'm saying that various concerns should be separate, and possibly using one single declarative language.
Layout is not style. Layout is not style. Layout is not style. Layout is not style.


@alcinnz Secondly, the root of the reason why documents are not applications is because documents have a very specific content flow mode (it may be in a left-to-right language like most languages, or a right-to-left script language like Hebrew and Arabic, but that's about the extent of variety for 99% of the content in the world)

Applications are not expected to follow a flow model, you should be able to position any element on any part of the available surface.

@alcinnz We're just lacking one proper language to describe layouts, that's all.
Having it all mixed up in CSS is another bloody mess that confuses problems and makes them a lot more difficult to solve them.

@haitch I'll bring that thought up on my mailing list for brainstorming JavaScript alternatives.

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!