StartGroepenDiscussieMeerTijdgeest
Doorzoek de site
Onze site gebruikt cookies om diensten te leveren, prestaties te verbeteren, voor analyse en (indien je niet ingelogd bent) voor advertenties. Door LibraryThing te gebruiken erken je dat je onze Servicevoorwaarden en Privacybeleid gelezen en begrepen hebt. Je gebruik van de site en diensten is onderhevig aan dit beleid en deze voorwaarden.

Resultaten uit Google Boeken

Klik op een omslag om naar Google Boeken te gaan.

The C++ Programming Language (3rd Edition)…
Bezig met laden...

The C++ Programming Language (3rd Edition) (origineel 2000; editie 1997)

door Bjarne Stroustrup

LedenBesprekingenPopulariteitGemiddelde beoordelingDiscussies
802127,462 (4.09)Geen
NOTE: Customers of this book, Errata for page 833 is now available in pdf form and can be downloaded from this page. This is a complete rewrite of the most widely read and most trusted book on C++. Based on the ANSI/ISO C++ final draft, this book covers the C++ language, its standard library, and key design techniques as an integrated whole. The C++ Programming Language provides comprehensive coverage of C++ language features and standard library components. For example: abstract classes as interfaces class hierarchies for object-oriented programming templates as the basis for type-safe generic software exceptions for regular error handling namespaces for modularity in large-scale software run-time type identification for loosely coupled systems the C subset of C++ for C compatibility and system-level work standard containers and algorithms standard strings, I/O streams, and numerics With this third edition, Stroustrup makes C++ even more accessible to those new to the language while adding information and techniques that even expert C++ programmers will find invaluable. Get a value-added service Try out all the examples from this book at www codesaw. com. CodeSaw is a free online… (meer)
Lid:r.n
Titel:The C++ Programming Language (3rd Edition)
Auteurs:Bjarne Stroustrup
Info:Addison-Wesley Professional (1997), Paperback, 911 pages
Verzamelingen:Jouw bibliotheek, Computers, Aan het lezen
Waardering:
Trefwoorden:Computers, Programming Languages

Informatie over het werk

The C++ Programming Language {3rd Edition} door Bjarne Stroustrup (2000)

Onlangs toegevoegd doorprengel90, hughiec, HakonEnger, zhuazhua88
Geen
Bezig met laden...

Meld je aan bij LibraryThing om erachter te komen of je dit boek goed zult vinden.

Op dit moment geen Discussie gesprekken over dit boek.

(Original Review, 2001)

Back in the day, I started programming AMOS on Commodore Amiga500. It was almost exactly like QBasic, but was able to do more powerful graphics and sound in an easier way, though still extremely similar. Because of how slow those CPUs were, I had to always try to find ways to make the programs run as fast as possible. And then I started programming QBasic on a 200Mhz PC, still being focused on trying to get as much power as possible in my programs. Around 2001 I started with C++ by using Stroustrup’s book, and even though we had a lot of power, I was manically trying to make everything as simple and efficient as possible, to get all that power out, even though I was on a powerful i7 with a GTX780. Whenever I thought of using "smart pointers", I always thought that I'll just use ordinary, low-level pointers, because I don't want to incur any overhead whatsoever. Check if a pointer is OK? Screw that, it'll cost me! Better to make sure it doesn't happen, rather than to check if it did happen, by being smart about it. I do simulations and experiments, and things like 3D game engines, and I wanted every little bit of performance I could get. I wanted the code to be perfect, so I kept re-writing everything, and I was afraid of using libraries that might have unnecessary overhead, like error checking/prevention, so I re-invented the wheel over and over. It's important to note that it was a hobby back then (still is, but less so). I wouldn't do it like that if I was going to share the code, or release a product (there was no psychologist available who could have helped me get over this obsession...)

The main problem is what I feel must still be tackled towards the end of reading Stroustrup's book: there's a lot of baggage from C, not on the spec, that's the least of the problem, but on people's minds when they code or of course when they reuse old code. When I started learning C or C++ programming, and it wasn't that far back, there was either material on pure old C or C++ that was almost identical to C with a few class definitions thrown in (and C fanatics pushing newbies to learn C instead of C++ for every project doesn't help and is simply insane).
At the end of the day C++ is abysmal if it's written like C since the only thing it gains is a couple of class definitions. The true power of newer languages is automation and abstraction above the micromanagement of C. Sure, that micromanagement might make sense when writing the Linux kernel, but for almost every other project it's a total waste of time since it doesn't even increase performance.

I've always felt there is no way around it that C++ has some serious design limitations and the developments of the last years only try to cope with some of them. It is no wonder that there are so many code analysis tools and everybody uses some of them. Apart from that, cross-compiling is still an issue, compiler output is cryptic and setting up a C++ workflow on Windows is ridiculous. I think Rust really has something. On top of that, the syntax is hideous. C syntax isn't perfect and certainly can be abused, but it's simple. With C++, they keep on extending it. How many new ways do you need to do casts?

C++ is not just for higher level it goes pretty deep and down to the bits as well, you can also code assembly with C++ - don't think small with C++ it is a tremendously large language and nearly impossible to master everything involved with it, people who have their PhD's still don't know everything that can be done with it - Bjarne even says he is surprised with what people can do with it - and the standard is always changing, what I am saying is - you should always be learning and never get stale, if you think you know everything go read "exceptional C++" - if you are good with that go run a project on github or get a job, if you have a job learn from those who are great.

Bottom-line: C++ allows a programmer to make mistakes, assumes he knows what he's doing, gives too much freedom and it's bad for safety. If you will learn 10 different programming languages, you will understand what I'm talking about. What can C do that C++ can't? You can do pointer arithmetic in C++, also unsafe casting, arithmetic overflow before allocation, corrupt the heap, return a local by reference, the list goes on, for both languages. The nice thing C++ gives us is smart pointers, but if you want to stay safe you have to subset the language, which raises the question: why use C++ then instead of a higher-level language that more accurately reflects your usage? Yes, C is a little more comfortable, "simpler", as you say. But that's only until you make big programs, where C allows you to make more errors/bugs, and it has less abstraction possibilities, so there's more stuff you need to keep in your head. The good thing is that you can use C++ in the same way you use C, if you want to, and you can mix stuff quite freely. If you tell your compiler that you're strictly using C, then you have less freedom. Even if you tell your compiler to strictly use C++, you can still use C++ in the same way you'd use C. OOP is optional, though it's sort of the point with C++. I think the difference between C and C++ becomes clear when you look at type-casting, for example. In C, when you want to type-cast, you might write "int x = (int)a_float;", to cast that float to int. But in C++, you have to explicitly state what kind of type-casting you're using. Reinterpret, dynamic, static, const. And the thing is that those 4 different type-casts exist in C, as well, but you never explicitly state which one you're using. In C++, it'd be "int x = reinterpret_cast(a_float);". As for "the debate", I didn't know there was one. C++ is clearly a better choice than C, since you can still do what C does, but you've got more, as well. Some say "but C is faster", and that's in a sense true, but C++ can be as fast as C, if you avoid those few things in C++ that make it slower. The freedom is there, without any drawbacks. That makes C++ the obvious winner.

That's why I'm all for using Python. Much safer. ( )
  antao | Oct 20, 2018 |
geen besprekingen | voeg een bespreking toe
Je moet ingelogd zijn om Algemene Kennis te mogen bewerken.
Voor meer hulp zie de helppagina Algemene Kennis .
Gangbare titel
Informatie afkomstig uit de Engelse Algemene Kennis. Bewerk om naar jouw taal over te brengen.
Oorspronkelijke titel
Alternatieve titels
Oorspronkelijk jaar van uitgave
Mensen/Personages
Belangrijke plaatsen
Belangrijke gebeurtenissen
Verwante films
Motto
Informatie afkomstig uit de Engelse Algemene Kennis. Bewerk om naar jouw taal over te brengen.
Programming is understanding.
Opdracht
Eerste woorden
Citaten
Laatste woorden
Ontwarringsbericht
Informatie afkomstig uit de Engelse Algemene Kennis. Bewerk om naar jouw taal over te brengen.
Please do not combine with other editions of The C++ Programming Language; this was largely expanded and rewritten to cover the ANSI/ISO C++ standard.
Uitgevers redacteuren
Auteur van flaptekst/aanprijzing
Oorspronkelijke taal
Gangbare DDC/MDS
Canonieke LCC
NOTE: Customers of this book, Errata for page 833 is now available in pdf form and can be downloaded from this page. This is a complete rewrite of the most widely read and most trusted book on C++. Based on the ANSI/ISO C++ final draft, this book covers the C++ language, its standard library, and key design techniques as an integrated whole. The C++ Programming Language provides comprehensive coverage of C++ language features and standard library components. For example: abstract classes as interfaces class hierarchies for object-oriented programming templates as the basis for type-safe generic software exceptions for regular error handling namespaces for modularity in large-scale software run-time type identification for loosely coupled systems the C subset of C++ for C compatibility and system-level work standard containers and algorithms standard strings, I/O streams, and numerics With this third edition, Stroustrup makes C++ even more accessible to those new to the language while adding information and techniques that even expert C++ programmers will find invaluable. Get a value-added service Try out all the examples from this book at www codesaw. com. CodeSaw is a free online

Geen bibliotheekbeschrijvingen gevonden.

Boekbeschrijving
Haiku samenvatting

Actuele discussies

Geen

Populaire omslagen

Snelkoppelingen

Waardering

Gemiddelde: (4.09)
0.5
1
1.5 1
2 3
2.5 2
3 15
3.5 4
4 39
4.5 1
5 37

Ben jij dit?

Word een LibraryThing Auteur.

 

Over | Contact | LibraryThing.com | Privacy/Voorwaarden | Help/Veelgestelde vragen | Blog | Winkel | APIs | TinyCat | Nagelaten Bibliotheken | Vroege Recensenten | Algemene kennis | 204,382,884 boeken! | Bovenbalk: Altijd zichtbaar