Live data from Hacker News

Show HN: Single-header C++11 HTML document constructor

github.com

11–12 of 12 posts

Re: Show HN: Single-header C++11 HTML document constructor

#11

I thought about this for a little while, and I think I don't like the API for this library. There are two things in particular I don't like. The first is that I think I would prefer to have helper types for each tag type so you don't have to include them as strings all the time, and the second is that I don't like the AppendChild approach that this library takes. I would change it so that you pass the document to the…

[deleted]

Re: Show HN: Single-header C++11 HTML document constructor

#12

I thought about this for a little while, and I think I don't like the API for this library. There are two things in particular I don't like. The first is that I think I would prefer to have helper types for each tag type so you don't have to include them as strings all the time, and the second is that I don't like the AppendChild approach that this library takes. I would change it so that you pass the document to the…

A reason why I don't like this approach is that I have to know where an element goes when creating it. I prefer creating an element and then moving it into place, so a module of my application can create some structure in isolation.

I agree. And your way I can add the same subtree to multiple parent nodes.
Post reply on HN