Download this episode

Download Video

Description

Attendee-driven Q&A with Day 1 and Day 2 speakers: Bjarne Stroustrup, Andrei Alexandrescu, Herb Sutter, Scott Meyers, Chandler Carruth, Sean Parent, Michael Wong, and Stephan T. Lavavej.

Day:

2

Code:

011

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      Daniel Kluss

      How will c++ look in 100 years?

    • User profile image
      Guest

      Do you people talk about esoteric C++ when meeting all together? :)

    • User profile image
      ANYTHING

      Would you rather fight 1 horse-sized duck or 100 duck-sized horses?

    • User profile image
      Ion Todirel

      Would you rather fight 1 horse-sized duck or 100 duck-sized horses?

      both!

    • User profile image
      Davis Silverman

      Hello, i would like to know what languages you use outside of C++? Also, how do you feel about functional programming?

      thank you so much for your time.

    • User profile image
      Saeed Amrollahi Boyouki

      I have a question. 3 days passed and we can't download the seminars at Day 2 and 3. Please tell me, when will the seminars and slides (3 days) be uploaded?

      TIA,
      -- Saeed

    • User profile image
      sad w8 user

      "How will c++ look in 100 years?"

      If microsoft gets what it wants than it will be a bastardized version like CX or CLI and locked in to windows and patented up to the ears so no open source operating system can or want to use it because it is made specifically for windows.

      You can hear the undertone quite well in some of the videos.
      You can also read between the lines based on microsofts actions over the past years.
      No matter what the pr people say, microsoft really loathe open source and everything that is free.
      They like lockin, censorship, lying to their customers, overpricing, price-fixing, scamming money out of customers, and so on.

      I want my start menu back and make metro optional install.
      Basically i want the old windows back, it gave you the choice, it knew you owned it and didn't want to force anything on you, most of the time.

    • User profile image
      John Dubchak

      @sadw8user, I am neither a Microsoft apologist nor a fanboy, but the one thing that struck me, and I kept hearing over and over from Microsoft compiler writers and speakers was, "write portable, standards-conforming C++ code".

      Not once did I hear anything about CX or CLI...having said that, one MS employee intimated, "...that's what we seem to be saying here...". So, though I have doubts, I was really impressed by how they showed themselves as being part of an open community when it came to ANSI Standard C++.

    • User profile image
      adrian

      I wondered if anyone could expand on what one of the speaks said about using the friend keyword as a means for keeping all the C++ code in one header file ala C#

      That sounds... Well, it sounds awesome.

    • User profile image
      adrian

      me again! - Also a quick code example using the friend keyword would be nice.

      Cheers :)

    • User profile image
      Mordachai

      I'd like to understand better why int over unsigned.  Personally, I've never liked signed values unless there is a valid reason for them.  e.g. count of items in an array, or length of a string, or size of memory block, etc., so often these things cannot possibly be negative.  Such a value has no possible meaning.  Why prefer int when it is misleading in all such cases?

    • User profile image
      benjamin​Lindley

      @Mordachai
      You prefer signed integers so that math works correctly in perfectly normal use cases.  If x < y, is it unreasonable to expect that x - y < 0?

      Yes, you can program around this incorrect behavior, but you shouldn't have to.

    • User profile image
      Christian Semmler

      While I understand the arguments pro always-use-int (signed), I personally have a different opinion.

      In the code I write on a daily basis, >90% of integers are unsigned. That's because the algorithms and logic they are being used in fundamentally can't have any meaningful sense if the integers were signed.

      I'm using unsigned int (or 'signed int', not int) because I want to be explicit about the signed-ness. If my interface presents unsigned integers (ignoring the fact that you usually should have more meaningful / stronger types than that), it means "this is only supposed to work with unsigned numbers". In the same manner, if my interface accepts signed integers, it means "this works both with signed and unsigned numbers".

      Basically, I think of it as a very light concept. Not emphasizing it (always using int / signed int) would be very annoying for me, because at all points, of a given chunk of code, I couldn't tell if it is supposed to work on unsigned only, or signed and unsigned. It would be implicit (bad - if you are lucky, the author made annotations / documentation). Also, in code which plain wouldn't work if given a negative number, I have to code around that (checking for < 0 and stuff).

      I get the point that mixing unsigned and signed can be troublesome, but in my experience that doesn't happen very often. If my source data is signed and I need to pass it on to an unsigned interface, I have to check for it to be positive, then just passing it on if true (which is safe). I don't see much of a big deal here.

      In my opinion, if you are a C++ programmer, you should be aware of the signed-ness of integers at all times (is it really so hard?). If that's already too much of a burden for you, I'd figure there might be other languages which suit you better.

    • User profile image
      Will

      @adrian About the "friend" keyword, Sean Parent said that he can define non-member functions inside the class definition as friends (with inline body). Code example:

      <code>
      class X {
      public:
      // ...
      void foo() { data++; }
      friend void bar(X& x) { x.data++; }
      private:
      int data;
      };

      // Usage: given an X x, compare:
      // x.foo();
      // bar(x);
      </code>

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.