Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   [OT] Good C++ book for a Python programmer (http://www.velocityreviews.com/forums/t340468-ot-good-c-book-for-a-python-programmer.html)

rick_muller@yahoo.com 01-19-2005 12:08 PM

[OT] Good C++ book for a Python programmer
 
I'm picking up C++ again after years of using almost nothing but
Python. I'm frankly enjoying the experience, and it's certainly
deepening my appreciation of Python (which you can read however you
like).

I was wondering whether anyone could recommend a good C++ book, with
"good" being defined from the perspective of a Python programmer. I
realize that there isn't a book titled "C++ for Python Programmers",
but has anyone found one that they think goes particularly well with
the Python way?

I'm asking this because evidently the C++ standard has changed a bit
since 1994, when I bought my books. Who knew that fstream was
deprecated?

Thanks in advance...


beliavsky@aol.com 01-19-2005 05:04 PM

Re: [OT] Good C++ book for a Python programmer
 
Rick Muller wrote:
>I was wondering whether anyone could recommend a good C++ book, with
>"good" being defined from the perspective of a Python programmer.


The STL and the template feature of C++ gives the programmer some of
the functionality of Python (using templates instead of duck typing,
vectors instead of lists etc.), so a book that introduces these
features early, such as "Accelerated C++" by Koenig and Moo, could be a
good start for a Pythonner. The 4th edition of the well-known "C++
Primer", with Moo as a new co-author, will soon be published. It is a
more comprehensive and much longer book.


Thomas Bartkus 01-19-2005 05:35 PM

Re: [OT] Good C++ book for a Python programmer
 
<rick_muller@yahoo.com> wrote in message
news:1106136496.719185.87850@c13g2000cwb.googlegro ups.com...
> I'm picking up C++ again after years of using almost nothing but
> Python. I'm frankly enjoying the experience, and it's certainly
> deepening my appreciation of Python (which you can read however you
> like).
>

Gad! After Python, how can you stand it (C++) ?
Adding object oriented utility to the C language was an atrocity, albeit
perhaps a necessary one given the state of the art when that particular
atrocity was committed. Aren't we past this?

If it is fast, fully compiled code you seek - couldn't you just C a few slow
functions and use them in your Python?

Thomas Bartkus



Paul Rubin 01-19-2005 05:45 PM

Re: [OT] Good C++ book for a Python programmer
 
"rick_muller@yahoo.com" <rick_muller@yahoo.com> writes:
> I was wondering whether anyone could recommend a good C++ book, with
> "good" being defined from the perspective of a Python programmer. I
> realize that there isn't a book titled "C++ for Python Programmers",
> but has anyone found one that they think goes particularly well with
> the Python way?


I think it's not possible to really grok C++ without having worked on
large multi-person C projects and understood what problems C++ tried
to solve. The only good book I know about C++ is by Stroustrup, "The
C++ Programming Language" or something like that; it's not an easy
book though.

Philippe C. Martin 01-19-2005 05:58 PM

Re: [OT] Good C++ book for a Python programmer
 
I suggest you google 'C++ tutorial'

Regards,

Philippe



On Wed, 19 Jan 2005 04:08:16 -0800, rick_muller@yahoo.com wrote:

> I'm picking up C++ again after years of using almost nothing but
> Python. I'm frankly enjoying the experience, and it's certainly
> deepening my appreciation of Python (which you can read however you
> like).
>
> I was wondering whether anyone could recommend a good C++ book, with
> "good" being defined from the perspective of a Python programmer. I
> realize that there isn't a book titled "C++ for Python Programmers",
> but has anyone found one that they think goes particularly well with
> the Python way?
>
> I'm asking this because evidently the C++ standard has changed a bit
> since 1994, when I bought my books. Who knew that fstream was
> deprecated?
>
> Thanks in advance...



Andrew Koenig 01-19-2005 07:02 PM

Re: [OT] Good C++ book for a Python programmer
 
<beliavsky@aol.com> wrote in message
news:1106151297.339844.95380@c13g2000cwb.googlegro ups.com...

> The 4th edition of the well-known "C++ Primer", with Moo as a new
> co-author, will soon be published. It is a
> more comprehensive and much longer book.


It is also organized more traditionally than "Accelerated C++."

"Accelerated C++" is mostly example-driven: It presents problems, shows how
to solve them, and introduces language and library features as needed for
particular parts of the solutions. Of course the problems are carefully
chosen so that the solutions cover the most important parts of the language
and library, but that fact is not immediately obvious from the nature of the
problems themselves.

"C++ Primer" follows the classical approach of treating each part of the
language and library separately in a single place. For example, there are
chapters on expressions, statements, functions, templates, object-oriented
programming, and so on. It is also much more systematic than "Accelerated
C++." It is also nearly three times the size.

Which of these books you prefer will depend on your learning style more than
anything else. If you are willing to read the entire book sequentially, you
will probably learn C++ faster from "Accelerated C++" than from "C++
Primer." On the other hand, if you want to see in one place what all the
different kinds of statements are, so that you can learn about them all at
once, then you will be more comfortable with "C++ Primer."

I'm biased, of course, but I believe that either of these books is a better
starting point for someone unfamiliar with C than any other book I can think
of.




John Hunter 01-19-2005 10:12 PM

Re: [OT] Good C++ book for a Python programmer
 
>>>>> "Philippe" == Philippe C Martin <philippe@philippecmartin.com> writes:

Philippe> I suggest you google 'C++ tutorial' Regards,

Stroustup's "The C++ Programming Language" is the best C++ book I've
read. It is at a fairly high level, and I already had read several
C++ books before reading it, so it may be tough sledding. But I would
try this first since you are an experienced programmer and know OO
concepts, and if it fails to satisfy try something lighter.
Unfortunately, I didn't like any of the other kinder, gentler overview
books I read on C++, so can't really recommend anything along those
lines, though I'm sure they are out there.

JDH

Scott David Daniels 01-19-2005 10:37 PM

Re: [OT] Good C++ book for a Python programmer
 
John Hunter wrote:
>>>>>>"Philippe" == Philippe C Martin <philippe@philippecmartin.com> writes:

>
>
> Philippe> I suggest you google 'C++ tutorial' Regards,
>
> Stroustup's "The C++ Programming Language" is the best C++ book I've
> read. It is at a fairly high level, and I already had read several
> C++ books before reading it, so it may be tough sledding. But I would
> try this first since you are an experienced programmer and know OO
> concepts, and if it fails to satisfy try something lighter.
> Unfortunately, I didn't like any of the other kinder, gentler overview
> books I read on C++, so can't really recommend anything along those
> lines, though I'm sure they are out there.
>
> JDH


For a rationale as to why the language developed the way it did, you
can read Stroustrup's "The Design and Evolution of C++". This is no
good for learning the language, but it might be a good library borrow
to find out why the language is the way it is.


-Scott David Daniels
Scott.Daniels@Acm.Org

Craig Ringer 01-20-2005 03:35 AM

Re: [OT] Good C++ book for a Python programmer
 
On Wed, 2005-01-19 at 09:04 -0800, beliavsky@aol.com wrote:
> Rick Muller wrote:
> >I was wondering whether anyone could recommend a good C++ book, with
> >"good" being defined from the perspective of a Python programmer.

>
> The STL and the template feature of C++ gives the programmer some of
> the functionality of Python (using templates instead of duck typing,
> vectors instead of lists etc.),


I'm particularly fond of internally refcounted objects (as used
extensively in Qt) and of guarded pointers, myself. The use of these two
things means one can avoid the "sometimes works, sometimes doesn't" fun
of referencing deleted memory by accident.

--
Craig Ringer


Ville Vainio 01-22-2005 05:55 PM

Re: [OT] Good C++ book for a Python programmer
 
>>>>> "Rick" == rick muller@yahoo com <rick_muller@yahoo.com> writes:

Rick> I was wondering whether anyone could recommend a good C++
Rick> book, with "good" being defined from the perspective of a
Rick> Python programmer. I

A good C++ book from the perspective of a Python programmer would be
one proclaiming that C++ is deprecated as a language, and it has
become illegal to develop software with it.

Rick> realize that there isn't a book titled "C++ for Python
Rick> Programmers", but has anyone found one that they think goes
Rick> particularly well with the Python way?

I don't think that's possible, considering the nature of the
language. Templates are closest to the Python way as far as C++
technologies go, but they are very unpythonic in their complexity.


Rick> I'm asking this because evidently the C++ standard has
Rick> changed a bit since 1994, when I bought my books. Who knew
Rick> that fstream was deprecated?

Stroustrup book, already mentioned by others, is the one if you just
need a "refresh" your knowledge. "Effective C++" and "More effective
C++" are also great to learn about all the nasty gotchas that your
Python experience might make you neglect. They are also certain to
deepen your appreciation of Python ;-).

--
Ville Vainio http://tinyurl.com/2prnb


All times are GMT. The time now is 05:20 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.