edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] [PATCH] Use the list class from the C++ STL,...
Date: Fri, 31 Jan 2014 12:09:51 +0000	[thread overview]
Message-ID: <20140131120951.GB10437@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20140030165853.eklhad@comcast.net>

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.

  parent reply	other threads:[~2014-01-31 12:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 21:58 Karl Dahlke
2014-01-30 22:18 ` Chris Brannon
2014-01-31 12:09 ` Adam Thompson [this message]
2014-01-31 12:35   ` Chris Brannon
  -- strict thread matches above, loose matches on Subject: below --
2014-01-31 18:37 Karl Dahlke
2014-01-31 18:48 ` Chris Brannon
2014-02-02 13:43 ` Adam Thompson
2014-01-31 13:02 Karl Dahlke
2014-01-31 17:33 ` Adam Thompson
2014-01-30 22:25 Karl Dahlke
2014-01-30 17:49 Karl Dahlke
2014-01-30 21:23 ` Chris Brannon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140131120951.GB10437@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).