Why Bjarne Stroustrup created C++




  • Moderators

    Nice one :D Thanks for sharing.



  • IMO Stroustrup did it to terrify mediocre developers :) Day after day I stumble upon legends of how horrific C++ is :D

    Needless to say, but still just to be sure, you do realize this interview is a joke/hoax :) That being said, there is some truth to it



  • Although I didnt find nothing in the site saying the interview was fake, I really didnt believe it to be true, and I really laught a lot.

    Got me thinking tought, I really like coding and learning new things so I read stuff about best pratices, performance, developers blogs, ... , but when things start to get hard / borring or with just to many theory, I think is better skip it and keep it simple (KISS), after all live is short.

    Probably I shouldn't say this, because I dont want to start a flaming war :) , but here it goes: I once used a goto (shame on me :) and I sticking to it (shame on me :)
    Why did I use it? Because it help me solve a bug, saved me the trouble of finding another "pretty" way to solve it, it was late, I was tired and wanted to get the thing working, and properly add coments explaining it. Also I am not a professional developer (although I have some apps in OVI) I code for FUN.



  • I thought everybody knew by now this was fake...

    http://en.wikipedia.org/wiki/Bjarne_Stroustrup
    (external links > "A hoax interview transcript with IEEE's Computer magazine.")



  • The hoax is convincing mostly because it touches on much debated topics and there is some truth in it, but not as substance, more like just for flavor. I agree it is very hard to maintain code which you did not write, especially when typedefs and macros are extensively used.

    But then again, there are the lines that contain claims that are obviously fake, the preposterous big sizes, claimed for C++ executables for example.

    This is quite old, I bet the recent additions to C++11 would have given the author much more material to work with. C++ is getting too big and complex, which is a departure of the simplicity of its C legacy. But then again, it is not like you need to use every tool in the language, one can be a proficient C++ programmer by using a very small portion of its features on regular basis.


  • Moderators

    A little off topic, but still...

    bq. I once used a goto (shame on me :) and I sticking to it (shame on me :)

    I think that for every rule there are always exceptions. While its use is obviously not in a best practices handbook, I think that if you do use something like this, then you did the proper thing in documenting why you did. If anyone reads your code later, at least they'll have an idea of your reasoning and some insight into what needs to be done in the event that they want to take the time to do it "correctly." So long as it's not jumping to an arbitrary spot in some unrelated method somewhere else, I think you might not have to endure the full wrath that might otherwise befall you. :)



  • If you know why you shouldn't use goto and when you need to use goto, it is 100% okay to use it. Loops are essentially preset and foolproof goto routines.



  • Just looked at that old code, it's a bunch of 'if's' inside a 'for' loop. The gotos are in the if's to send the execution to the 'for' bottom. Easily could be replaced with a switch case with break's or ifelse's.
    Don't know why I didn't think of that, that's what you get from coding in the dead of the night.
    Sometimes, we just have to get away from our code, and comeback much later with a fresh mind to solve the problem. I read in some guy blog, don't remember where, that MS was using goto deep in same layer of MFC Visual C++.
    Sorry about the off topic, guys.
    Cheers



  • I don't believe this is true, Bjarne Stroustrup is not a jerk like the interview could be
    He is one of the most polite and humble programmer I know

    I think C++ is so complicated because C++ want to offer programmers a lot of power
    Maybe in the future we could have a much more better solution than C++ which could
    fulfill all of the works could be done by C++ by much more simple method with equivalent
    or better performance(speed, memory, develop time and so on)

    I am not a good C++ programmer, I don't know every aspects of C++, keep learning
    but I don't think I need to know everything of C++ before I could code.


  • Moderators

    bq. I don't believe this is true...

    This is obviously a satirical piece. It is not true.



  • Made me grin though :D


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.