Bjarne Stroustrup on the Evolution of Languages - Interview MSDN Magazine Apr 2008

This is a discussion on Bjarne Stroustrup on the Evolution of Languages - Interview MSDN Magazine Apr 2008 within the A Brief History of Cprogramming.com forums, part of the Community Boards category; http://msdn.microsoft.com/en-us/magazine/cc500572.aspx I have this link in my Microsoft subscription letter. Maybe it will be of some interest for others......

  1. #1
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,459

    Bjarne Stroustrup on the Evolution of Languages - Interview MSDN Magazine Apr 2008

    http://msdn.microsoft.com/en-us/magazine/cc500572.aspx
    I have this link in my Microsoft subscription letter. Maybe it will be of some interest for others...
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  2. #2
    Banned
    Join Date
    Nov 2007
    Posts
    678
    I liked the fact that he himself is unhappy about some things in C++
    This makes me feel better, if even the creator can't change some things, then, at least I should stop rambling about some tiny problems, that usually come by me, sometimes !

    Waiting for C++0x although!

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Good interview. Loved the bit at the end about cell phones. I love how games, video, cameras, etc. are all being perfected by I still routinely get dropped calls, missed voice mails, etc. Flash over substance, which seems to be the norm anymore.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,404
    It still pains me bjarne fully supports the auto keyword. Bah!

    *defeated*
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,326
    It still pains me bjarne fully supports the auto keyword. Bah!
    What's wrong with the new use of auto?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,404
    Quote Originally Posted by laserlight View Post
    What's wrong with the new use of auto?
    At the surface nothing:
    - You get more expressiveness (syntactical);
    - You save on keystrokes;
    - You minimize (debatable) compile time errors.

    Complex template base object declarations are made simpler, I foresee iterators being one of the favorite uses for auto. But also, as suggested on the article, "hard to acquire" types can be easily declared.

    However, I believe auto is an accident waiting to happen. For one, you lose semantical expressiveness and you make the code logic harder to follow. auto almost feels like I'm wanting to program in a non typed system; i.e. "I don't know the type, I just know it's some form of X, I can't bothered checking the library documentation, or it is too long to type, so I go with auto. This will work."

    But the above argument has it flaws, I concede. I only recently started giving template based programming a hard look. And already I'm faced with annoying type declarations that I wished (truly) had been made simpler. As such, I can only imagine what the above paragraph may look like to a seasoned template based programmer.

    My major beef with it is instead the fact the new use of auto is an accident waiting to happen also because of the fact it opens yet another door for bad code. The fact it is openly discussed as a tool for the beginner programmer, by the very same people who are institutionalizing it, only makes this worse. You know what I mean, but for illustration purposes, the following is not something you, I, or anyone else would like to see in the years to come on the C++ board:

    Code:
    std::string foo(int x);
    
    int main () {
        auto bar = foo(13);
    }
    And yet, I foresee this is exactly what is going to happen.

    EDIT: Note that the loss of semantical value is no minor issue. The amount of inconvinient and confusing bugs that might arise from auto foo = "This is a string"; when written by a programming language beginner is overwhelming. Is auto in this instance helping him, or on the other hand making his life harder for not even making it clear this variable is a const char*? Can we say type obfuscation? I chose this example because, believe it or not, is what you can see here: http://en.wikipedia.org/wiki/C&#37;2B%2B0x

    EDIT 2: Just a minor correction; one doesn't need to be a seasoned "template based programmer" (allow me that expression yet again) to experience the need for auto, as anyone who has, for instance, constructed a complex STL container can attest.
    Last edited by Mario F.; 05-01-2008 at 09:40 AM. Reason: post was showing an unintentional icon. Removed
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #7
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,459
    I've found it funny to see him discuss the vector<Apple> and vector<Fruit> after seeing same discussion on this forum...
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Thanks, vart, that was a great article. And I also greatly enjoyed the linked paper about multiple dispatch.

    Is auto in this instance helping him, or on the other hand making his life harder for not even making it clear this variable is a const char*?
    The worst part is that it isn't. The type of a string literal is const char[N], where N is the number of chars in the string literal, including the terminator. The type of a wide string literal is const wchar_t[N], same rule.
    What does this mean? It means this:
    Code:
    const char *s1 = "foo";
    const char *s2 = "foo";
    assert(s1 == s2); // Probably true. Compilers generally fold string literals.
    
    auto a1 = "bar";
    auto a2 = "bar";
    assert(a1 == a2); // Definitely false. On a side note, you've just wasted 8 stack bytes for nothing.
    I need to go edit that Wikipedia article.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #9
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,459
    Thanks, vart
    It makes me happy to see that people find this link useful... So you're wellcome.
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  10. #10
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,404
    Quiet right, CornedBee. And yet another reason to be carefull around auto.

    But for all purposes the example shouldn't even be there, in my opinion, because it suggests exactly what I'm against with; an oversimplification of its true usefulness that will introduce a new crowd of bad code and hard to track bugs. It pains me especially that it is advertised as being introduced to help the life of newcomers to the language.

    Personally I feel auto is an advanced feature that is (un)fortunately extremely easy to use. This contradiction only means use and abuse of auto will probably become all too prevalent.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Probably. But as one of those seasoned template programmers you refer to, I'm way too happy about auto to care about its abuse by newbies.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #12
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Good read. I'm concerned with auto but I guess I'll get used to its uses and abuses. Bjarne seems to be a fundamentals type fella which is nice because he realizes that new bells and whistles or the latest greatest thing does not always make a good language. Overall I like the new features that were mentioned and look forward to learning and working with the new standard (sometime in the next few years?). Since it was 2003 to 2005 before most compilers caught up to the most recent standard I doubt I will see a compiler up to the new standard for quite some time.

  13. #13
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Quote Originally Posted by Bubba View Post
    Overall I like the new features that were mentioned and look forward to learning and working with the new standard (sometime in the next few years?).
    Depends on how much of them you want. GCC will develop support gradually. Vararg templates and r-value references are there now, in GCC 4.3.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  14. #14
    Banned
    Join Date
    Nov 2007
    Posts
    678
    An offtopic question:

    Quote Originally Posted by CornedBee
    All the buzzt!
    What that means?

  15. #15
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    It means, "All the best!", that is, a well-wishing, with altered spelling to make a pun on my username. I've been using it as long as the username exists.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An Interview with Bjarne Stroustrup By Michael Miller
    By kermi3 in forum Article Discussions
    Replies: 9
    Last Post: 03-15-2005, 09:59 AM
  2. Interview with Bjarne Stroustrup "C++ a joke"
    By novacain in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 03-31-2003, 10:55 PM
  3. Exclusive Interview With Bjarne Stroustrup
    By Osama Lives in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 05-07-2002, 03:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21