Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming

Interviews: Ask Bjarne Stroustrup About Programming and C++ 427

In addition to being the creator of C++, Bjarne Stroustrup is a Managing Director in the technology division of Morgan Stanley, a Visiting Professor in Computer Science at Columbia University, and a Distinguished Research Professor in Computer Science at Texas A&M University. Bjarne has written a number of books and was elected a member of the National Academy of Engineering. He will be doing a live Google + Q & A within the C++ community on August 20th, 2014 at 12:30pm EST, but has agreed to answer your questions first. As usual, ask as many as you'd like, but please, one per post.
This discussion has been archived. No new comments can be posted.

Interviews: Ask Bjarne Stroustrup About Programming and C++

Comments Filter:
  • USP (Score:1, Interesting)

    by Anonymous Coward on Thursday August 14, 2014 @12:47PM (#47671303)

    Your language has become one of the most popular in history. If you were launching it today, how would you "market" it? What do you think is the unique selling point?

  • by Katatsumuri ( 1137173 ) on Thursday August 14, 2014 @12:52PM (#47671349)

    Sometimes well-established languages keep adding new features and syntactic constructs until most developers are not even aware of all the possibilities, and use maybe 20% in their usual daily work. The old features and syntax are kept around for compatibility and to keep the old guard content, even if cutting them would lead to faster compilation, more elegant language and less confusion.

    This may be part of the reason for the constant introduction of new trendy languages with radically simplified syntax and libraries... Which then follow the same pattern. Few languages are introducing new paradigms, many are trying to be a "better" C++, Java, LISP, JavaScript or Perl.

    Do you think this cycle is inevitable, or could it be a good idea to sometimes clean up the syntax and the obscure features in new specification versions, to keep the established languages more competitive?

  • by Anonymous Coward on Thursday August 14, 2014 @12:54PM (#47671361)

    C++ is one of the most complex, inscrutable computer languages ever created. When I read about C++11, I was surprised that it layered more complexity and inscrutability on top of what was already there (like the weird lambda syntax). I wonder if C++ has become an over-the-top example of how not to do a programming language. Is that by intent, or did it just happen? In future versions of the language, will any cosmetic changes be made to create a more understandable language that doesn't overload a small set of symbols and keywords, so that normal programmers have a chance to figure out the language? The language seems to have reached the point that C++ gurus design it for other C++ gurus, and everyone else ignores it. C++ was once the up and coming language of choice, but it has become so difficult that programmers have considered it damage and routed around it. Are you comfortable with this fate for C++, as a niche language for insiders, or do you want to use your influence to rehabilitate the language so that more programmers will use it?

  • by stox ( 131684 ) on Thursday August 14, 2014 @12:58PM (#47671401) Homepage

    How do you feel about the evolution of C++ since it was first implemented with Cfront? What began as a pretty straightforward language has been expanded to significant complexity. Has this evolution been positive, or has it been an attempt to make the language apply to too many possible applications?

  • by Richard Dick Head ( 803293 ) on Thursday August 14, 2014 @12:59PM (#47671413) Homepage Journal
    This question is a little US-centric. Let me try to iteravely improve on this...

    From your perspective, how is the globalization of commerce and specifically programming affecting you and those you know? Are the new high level scripting tools available to programmers since C++ became popular pushing the profession towards a more "commoditized" state, where people are easily replaceable and where the related skills and specialization eventually offer no better benefits and compensation than other less skilled professions?
  • by Bugamn ( 1769722 ) on Thursday August 14, 2014 @01:00PM (#47671421) Journal
    What is your favourite programming language that isn't C++ (or C)?
  • by slashdice ( 3722985 ) on Thursday August 14, 2014 @01:01PM (#47671427)
    Maybe the premise of this question is wrong... but I seem to recall reading somewhere that you hate C but built C++ on top of it because it was popular. Is that true and if so, do you ever feel bad about the bait and switch?
  • Regrets (Score:5, Interesting)

    by Anonymous Coward on Thursday August 14, 2014 @01:04PM (#47671447)

    What do you regret most in C++ and how would you like to change it?

  • by tepples ( 727027 ) <tepplesNO@SPAMgmail.com> on Thursday August 14, 2014 @01:04PM (#47671459) Homepage Journal
    The general consensus as I understand it is that the <iostream> wing of the C++ standard library is hairy [yosefk.com], convoluted [slashdot.org], time inefficient [vterrain.org], and space inefficient in implementation [pineight.com]. What's the better solution? <cstdio>? Is Boost.Format, as shutdown -p now suggested [slashdot.org], any good?
  • by DaphneDiane ( 72889 ) <tg6xin001@sneakemail.com> on Thursday August 14, 2014 @01:05PM (#47671471)

    One of the recent concerns raised with C++ compared to other popular languages is the breadth of the standard library. I know that the C++ standard committee was looking at adding a C++ transformed version of Cairo to the standard. And of course their is boost. What else do you see coming to address the perceived API shortcomings?

  • Hour of Code (Score:5, Interesting)

    by Orestesx ( 629343 ) on Thursday August 14, 2014 @01:07PM (#47671489)
    What is your opinion of the the "Hour of Code" as promoted by CSEdWeek? Does it trivialize computer science education?
  • ABI (Score:5, Interesting)

    by gbjbaanb ( 229885 ) on Thursday August 14, 2014 @01:08PM (#47671501)

    Do you think that one thing holding C++ back is the lack of a standarized binary interface?

    Currently if I want to make a module that can be consumed by others (whether than is others using a different language, or a different C++ compiler, or even just to use a pre-built module without sources) I have to export everything as C and use its (de-facto if nothing else) binary standard.

    I think an ABI for C++ would increase its "real world" attractiveness considerably with little, if any, overhead. Do you agree, or are there issues around this that make it a significant challenge (apart from vendor adoption of course).

  • AI writing code? (Score:3, Interesting)

    by Katatsumuri ( 1137173 ) on Thursday August 14, 2014 @01:11PM (#47671519)
    Do you think AI will start replacing junior programmers in the foreseeable future, similar to car drivers and call center operators?
  • by BenSchuarmer ( 922752 ) on Thursday August 14, 2014 @01:37PM (#47671725)
    The comments and questions here look overwhelmingly negative. On the other hand, all of this passion only exists because people are using C++.
  • by Marginal Coward ( 3557951 ) on Thursday August 14, 2014 @01:43PM (#47671765)

    I'm a fan of C++ overall, but it seems to me that C++ templates are a bit of a disaster. They're so complex that I doubt that anybody but you and P. J. Plauger *fully* understands them. Also, when they're actually used, they often result in bloated, slow code - as I recently experienced when stepping through some STL string functions. Further, they bring on a lot of portability issues, evidently due to the difficulty that even the compiler folks have had in understanding and implementing them. Therefore, many programmers minimize their use of templates, both in their own code and in their use of templated library code.

    Compared to the complexity of C++ templates, the C macro preprocessor provides a rudimentary form of templating via its very simple and powerful paradigm of text substitution. I've had some success implementing a limited form of generic (type independent) programming in C using just the C preprocessor. I've had much less success doing generic programming via C++ templates.

    If you had templates to do all over again, what would you do differently? Was all the complexity of C++ templates (e.g. "partial specialization") really necessary to achieve its goals? Were the goals maybe too ambitious?

  • by jonwil ( 467024 ) on Thursday August 14, 2014 @01:55PM (#47671877)

    If you could add one feature to C++ (either the language or the standard library) and have it adopted in the C++ standard and supported by all the compilers etc, what would it be and why?

  • C++ without the C (Score:5, Interesting)

    by kthreadd ( 1558445 ) on Thursday August 14, 2014 @02:00PM (#47671917)

    Apple recently introduced a language they call Swift or Objective-C without the C. It is technically a completely different language from Objective-C though. When C++ started out it had the major benefit that it was (mostly) compatible with C which at the time was immensely popular, making it trivial to mix new C++ code with existing C code. Today C is still a popular language but not as widely used as it once was. Assuming that C++ could drop C compatibility, how would you take that opportunity to improve C++?

  • by kthreadd ( 1558445 ) on Thursday August 14, 2014 @02:19PM (#47672117)

    Apart from work, do you have any personal programming projects going on? Which type of programming do you like most and is there a particular project that you would like to implement?

  • Code rejuvenation (Score:4, Interesting)

    by SansEverything ( 3785255 ) on Thursday August 14, 2014 @05:33PM (#47673523)
    You speak alot about code rejuvenation and bringing old code to new standards. As you are working on C++14, many compilers do not fully support C++11 yet. In the past, it was even worse. Don't you think that this lack of feature support from compilers is a major problem and the biggest obstacle to code rejuvenation?
  • by Anonymous Coward on Thursday August 14, 2014 @07:03PM (#47674107)

    What stuff is unpleasant to use? The syntax of rvalue references is a bit odd...

    Well, the choice of angle brackets for templates isn't exactly pretty, but that ship sailed long ago...

    More seriously, the new style C++11 function declaration syntax is needlessly annoying. The committee could have chosen to introduce a new keyword "function", and not much production code would have been broken (though probably much, much more if they had chosen "func"). Altering C++98/C++03 code containing "function" as an identifier doesn't seem like a herculean burden compared to inflicting this choice of syntax on every C++ programmer, forever (for reasonable values of "forever"). The closely related lambda syntax doesn't massage the eyeballs either, IMHO. I'm aware of the committee discussions around the new function/lambda syntax, but simply disagree with the outcome.

    I say these things as someone who strongly prefers C++ for most of the tasks I encounter, but even well-crafted C code can look like symbol soup, and it's a little worse for C++98, even more so for C++11. Of course, the new syntax will become second nature soon enough as it has before, but it will remain less than pleasant.

    - T

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...