The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

About that ugly beast named C++ by BrainBug2005-03-15 11:02:58
  The Design and Evolution of C++ by williamashbless2005-03-15 11:06:38
    Eeeep... by BrainBug2005-03-15 11:17:56
      From a practical angle... lots of C++ites here. by williamashbless2005-03-15 11:19:56
        Ah, but that's what it's about. by BrainBug2005-03-15 11:33:56
          virtual by ToLazyToThink 2005-03-15 11:51:48
That one is for efficiency.

Most compilers implement virtual methods using a table of function pointers. That is no where near as efficent as calling the method directly (possibly even inlining it).

One of the principles of C++'s design is: You don't pay for what you don't use. So if you don't use virtual, you don't have to pay the overhead of the function pointer tables.

As far as the defaults for private, protected, public, I don't even remember the defaults. I always spell it out in my code.
[ Reply ]
            Agreed. by Michiel2005-03-15 11:53:38
              Which is a warning sign by LionsPhil2005-03-15 14:04:44
                Agreed by ToLazyToThink2005-03-15 14:12:58

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)