From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from qmta10.westchester.pa.mail.comcast.net (qmta10.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:43:76:96:62:17]) by hurricane.the-brannons.com (Postfix) with ESMTP id 341A677AD7 for ; Tue, 24 Dec 2013 01:30:26 -0800 (PST) Received: from omta04.westchester.pa.mail.comcast.net ([76.96.62.35]) by qmta10.westchester.pa.mail.comcast.net with comcast id 5MW31n0010ldTLk5AMWMQD; Tue, 24 Dec 2013 09:30:21 +0000 Received: from eklhad ([107.5.36.150]) by omta04.westchester.pa.mail.comcast.net with comcast id 5MWM1n0043EMmQj01MWMwF; Tue, 24 Dec 2013 09:30:21 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke User-Agent: edbrowse/3.4.10 Date: Tue, 24 Dec 2013 04:30:18 -0500 Message-ID: <20131124043018.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1387877421; bh=S0CyZetLhrTyxiAD4ExnWE8TnAacFyVad4nBkabiLX8=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=hbOvO+GCUvtevpzm3PDEW6R2iCplCg7saTaRk34JfOwkqUwww9kndPKiz6qo/kELh e5wrtBRwB3ehTUoKXLOhFAKsOeR0NYVnTor2pUfQ/Z5qw5hn+YQb7rowLNT+wEBdGM Gbj6z7SflagIVq6Vg1t61HGPk4Aqg2OCz9PpDMnmD0mMuebayLpG14euYAk8n/HJ+K f3TCFi2bDWP3gr4BiehB19eJpaj+iY5qXQTUSu71Wg/Cb4mOybUC/ccQ7vNzeFfCNr 2hWKW9zBlI3PUOFfKqFe7Tv1ePL8BsiZhJ50JH+GGB1nkDmkEkL601e7zYrY1AKPLj LO+w9Lcoeajqw== Subject: [Edbrowse-dev] Mix X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Karl Dahlke List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 09:30:26 -0000 Adam writes: > Slightly pedantic note about this, in c++ you *should* really use > #include > Rather than > #include But that's my point, isn't it? We don't have to change everything over right away for it to work. Maybe we should, someday, but we don't have to, not right away. The preexisting code works. > You could also use > cin >> s; > Instead of > getline(cin, s); This is not true. If someone types in the line hello world The first construct will capture only hello, a string separated bye whitespace, whereas getline() captures the entire line. The tutorial recommends using getline, because you know exactly what you are getting, the line as it was typed. It doesn't vary with whitespace. Then you can analyze it and take action accordingly. So when I do convert edbrowse to c++, I can replace fgets with getline. Still there are advantages. I don't have to have a fixed buffer of a fixed size, or worry about what happens if the user types in a line longer than that buffer, or clip crlf off of the entered line; c++ does all that for us. So there are still some big advantages to c++, and yet, you can't really go all the way over to the shorthand that your professor put up on the board and showed you how cool it is. Yes I will globally replace bool with eb_bool. Obviously I thought the bool datatype was very useful, but I hadn't anticipated the collision with bool in c++. Thanks for spotting that one. I'll make that change and push in the next day or so. Karl Dahlke