From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 4146677AA5 for ; Fri, 31 Jan 2014 04:10:23 -0800 (PST) Received: by mail-wg0-f51.google.com with SMTP id z12so8493702wgg.18 for ; Fri, 31 Jan 2014 04:09:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=8FR8OWHTapsp6+gvTmVw0UiE/BTJ9v4SXkMMcx7Wmh0=; b=p3Q5lb/+u2ngBXmyN7tXak4+7zDpnpUdnnUOO7EXkFjEnUfczKCPxcqi/nHK/XcRJS 1asXKly8Z004xOX14+F/YCaU6eXRIogSDXxxYpMwgntDCxbKik3Ni2flyt1W1Q0FK2I8 yOBi03vYd4ldkHL4EuD+VkpUGNj7HDWLV04Qk/ohGtylRJuQnZd2T9zYGuN9oJ2U3DK0 S9qZtz7mh5CkwnsVHgXtWpbqniaw72h7nu8+dGg/Ynja+DCvsOfBmTufjQKLxCcbWBTN 8urvF8fmlfAvBraaL8NaQm0nHoATl+rdHI9uz4n6GfNcV04AoHYszmbGOi121FDMjFmG giiw== X-Received: by 10.194.240.41 with SMTP id vx9mr977185wjc.70.1391170194988; Fri, 31 Jan 2014 04:09:54 -0800 (PST) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id ff9sm56613237wib.11.2014.01.31.04.09.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jan 2014 04:09:54 -0800 (PST) Date: Fri, 31 Jan 2014 12:09:51 +0000 From: Adam Thompson To: Karl Dahlke Message-ID: <20140131120951.GB10437@toaster.adamthompson.me.uk> References: <20140030165853.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140030165853.eklhad@comcast.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] [PATCH] Use the list class from the C++ STL,... X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jan 2014 12:10:23 -0000 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.