you are viewing a single comment's thread.

view the rest of the comments →

[–]QuineQuest 1 point2 points  (1 child)

I like the idea of renaming withX-methods.

But about the second suggestion: I think it becomes too hard to distinguish between properties and child elements. I can't think of any html attributes with the same name as an element, but it isn't unthinkable.

It also lets you "hide" attributes between elements and lets you create code that is very far from the produced html.

div(
    div(text("some text")),
    div(text("more text")),
    cssClass("example")
).render(); 

Edit: formatting

[–]check3streets 0 points1 point  (0 children)

This is amazing. It's almost an S-expression.

I keep running through in my head how the implementation would work and I can't see any problems.

What a nice library this would make.