On Thu, Jan 30, 2014 at 04:58:53PM -0500, Karl Dahlke wrote:
> > htmlTag should probably be a proper class,
> 
> I guess I figure when we use C++, for whatever reason, we should use its 
> power.
> And selfishly, it's a good way for me to learn it.
> But I don't mean to create a lot of work for you either.

Yeah, I'm not sure why we'd want to do the full constructor,
destructor etc thing with this, apart from design for design's sake,
which in my opinion is not just unnecessary but actually harms maintainability.
I've seen much c++ code which makes wide use of structs.

> > all the char * members need to be replaced with string.
> 
> Need to? Really? Right away?
> A good idea perhaps but might open up a can of worms.
> Like name is assigned the string produced by htmlAttrVal() in format.c,
> returning a c string of course,
> and yes I suppose this would autocast itself into a c++ string,
> but I wonder if there won't be a number of other cross file confusions here.

No, char * does not autocast into a c++ string.
Thus, whereas we can pull some of this stuff into html.cpp,
we're definitely opening a large can of worms for very little benefit.
The only useful reason I could see for this change is handling nulls in names
but this wouldn't be valid html anyway i suspect.

Cheers,
Adam.
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to