[hcs-d] learning C++

Greg Price gprice at post.harvard.edu
Wed Apr 6 14:44:04 EDT 2011


Google uses C++ for most of their server code. They're much better off
than if they used C or Fortran for that purpose -- good C++ code can
be resistant to memory-corruption bugs in ways similar to Java or
Python programs. And of course it's much faster and more compact in
memory than an equivalent Python program.

Arguably Java could serve that purpose just as well, though, and
indeed Google uses Java for some newer products like Gmail. I think
there is still a region of tradeoffs where the performance of C++
makes it a better choice than Java, but I think improved JVMs with
JITs have made that region a lot smaller in 2011 (or 2004 -- Gmail's
release) than it was in 1998 when Google started.

Greg



On Wed, Apr 6, 2011 at 11:21, Zak Stone <zstone at gmail.com> wrote:
> Hello everyone,
>
> If you don't mind a provocative question, are those of you who have
> invested the time to develop deep expertise with C++ _glad_ that you
> did so? I recently noticed the following intriguing exchange on the
> NumPy discussion list:
>
>>> I've been slowly arriving to the conclusion that [there] is no place for
>>> C++ in programming. If you really need to twiddle bits, use C. If you
>>> need high performance numerics, use Fortran. If you need high level
>>> complex data structures, use Python.
>>
>> It is sad that C++ takes 5 years to master, and this insight comes after
>> using it for another 5 years or more. I regret ever learning C++, but
>> how could I have known that in advance?
>
> To be clear, I'm looking for insights, not a flame war. I would like
> to understand the perspectives quoted above while recognizing that
> tastes can reasonably vary.
>
> Thanks,
> Zak
>
>
> On Wed, Apr 6, 2011 at 2:01 PM, Brandon Liu <bliu at college.harvard.edu> wrote:
>> If you are most comfortable with Java, I would recommend C++ For Java
>> Programmers: http://www.amazon.com/C-Java-Programmers-Mark-Weiss/dp/013919424X/ref=sr_1_1?ie=UTF8&qid=1302112713&sr=8-1.
>> It does a good job of explaining the differences between Java and C++. (Like
>> how class definitions differ, pass-by-value vs pass-by-reference, copy
>> constructors, etc.) It's also pretty short (I think a little less than 300
>> pages), so it'll give you a good primer for C++, without being too long.
>> Great online resources:
>> http://www.cplusplus.com/reference/ I use this site so much
>> http://www.parashift.com/c++-faq-lite/ Awesome resource that explains a lot
>> of things in C++ very well.
>>
>> On Wed, Apr 6, 2011 at 12:55 PM, Leonardo de Nevi <ldenevi at fas.harvard.edu>
>> wrote:
>>>
>>> Yeah, I'm with Greg.
>>>
>>> Pretty much any book written by Bjarne Stroustrup is good. I learned from
>>> some book published in the late '80s. Then I got better reading this book:
>>> The C++ Programming Language
>>>
>>> - Leo
>>>
>>>
>>>
>>>
>>> On 4/6/2011 12:48 PM, Greg Brockman wrote:
>>>
>>> I learned C++ from the 1990 edition of the Annotated C++ Reference
>>> Manual (http://www.amazon.com/Annotated-C-Reference-Manual/dp/0201514591).
>>>
>>> It's not for everyone.  It's probably not for most people in fact -
>>> it's really an implementor's guide.  But it also goes through the
>>> language semantics, design decisions (including pointing out those
>>> where C++ chose wrongly), and gives implementation hints for things
>>> like inheritance.  The biggest downside is that, being a language
>>> reference, it has no information on the STL.
>>>
>>> I feel that most "learn a new language" books I've read try to teach
>>> both the language *and* general programming at the same time - but at
>>> some point, you really just want the former.  Highly recommend this
>>> book to anyone who is looking for the former to an extreme.
>>>
>>> - gdb
>>>
>>> On Wed, Apr 6, 2011 at 9:33 AM, Julia Winn <jwinn at fas.harvard.edu> wrote:
>>>
>>> reply all please!
>>>
>>> On Wed, Apr 6, 2011 at 12:30 PM, Robert Nishihara
>>> <robertnishihara at gmail.com> wrote:
>>>
>>> Anyone know of a good C++ book or of a good way of learning C++?
>>> -Robert
>>> _______________________________________________
>>> hcs-discuss mailing list
>>> hcs-discuss at lists.hcs.harvard.edu
>>> https://lists.hcs.harvard.edu/mailman/listinfo/hcs-discuss
>>>
>>> _______________________________________________
>>> hcs-discuss mailing list
>>> hcs-discuss at lists.hcs.harvard.edu
>>> https://lists.hcs.harvard.edu/mailman/listinfo/hcs-discuss
>>>
>>>
>>> _______________________________________________
>>> hcs-discuss mailing list
>>> hcs-discuss at lists.hcs.harvard.edu
>>> https://lists.hcs.harvard.edu/mailman/listinfo/hcs-discuss
>>>
>>> _______________________________________________
>>> hcs-discuss mailing list
>>> hcs-discuss at lists.hcs.harvard.edu
>>> https://lists.hcs.harvard.edu/mailman/listinfo/hcs-discuss
>>>
>>
>>
>> _______________________________________________
>> hcs-discuss mailing list
>> hcs-discuss at lists.hcs.harvard.edu
>> https://lists.hcs.harvard.edu/mailman/listinfo/hcs-discuss
>>
>>
> _______________________________________________
> hcs-discuss mailing list
> hcs-discuss at lists.hcs.harvard.edu
> https://lists.hcs.harvard.edu/mailman/listinfo/hcs-discuss
>
>


More information about the hcs-discuss mailing list