• C++ past, present, and future

    From Nightfox@VERT/DIGDIST to All on Thu Oct 10 02:00:34 2013
    Today, at a software developer conference, I saw a really interesting presentation from Scott Meyers (author of the books "Effective C++", "More Effective C++", and "Effective STL" - http://en.wikipedia.org/wiki/Scott_Meyers) regarding why he thinks C++ has been
    so successful all these years. Two of the main reasons he gave were that C++ is compatible with C code and libraries and the fact that C++ compilers are available for almost every platform. Also, he said that C++ standardization will start to go more quickly - Even though the new C++11 standard was just ratified a couple years ago, they're already talking about a C++14 and C++17, and they'll be introducing new features in each version.

    He showed a chart showing the most popular programming languages over time, and
    it showed that for quite a while now, the top 3 languages have been Java, C, and C++. It has showed C++ dropping in popularity since around 2005 but is still among the top 3 (it is currently #3). Surprisingly to me, it showed C consistently high in popularity, never really dropping in popularity, and the top 3 are currently C, then Java, then C++.

    So even though C++ has been dropping in popularity, it is stil among the top 3 programming languages in terms of popularity, and it seems it will probably stick around for a long time. It will be interesting to see what gets added and changed in C++ in the years ahead. Some of the new syntax in C++11 looks a
    little strange, but they've simplified some tasks - For instance, lambda functions, the "auto" type and the new syntax for iterating through STL containers:
    for (auto item : container)

    The "auto" variable type bugs me a little bit, since I like C++'s strongly-typed system and being clear on the types of the variables; however, it does make some statements easier to read, I suppose.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Deuce@VERT/SYNCNIX to Nightfox on Thu Oct 10 03:56:05 2013
    Re: C++ past, present, and future
    By: Nightfox to All on Wed Oct 09 2013 07:00 pm

    The "auto" variable type bugs me a little bit, since I like C++'s strongly-typed system and being clear on the types of the variables; however, it does make some statements easier to read, I suppose.

    Hrm? What's that? I thought C++ was supposed to be source compatible with C. With an auto variable type, it sounds like the following would mean something different:

    int main(int argc, char **argv)
    {
    auto i;

    for(i=0; i<argc; i++);
    }


    ---
    http://DuckDuckGo.com/ a better search engine that respects your privacy.
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Nightfox@VERT/DIGDIST to Deuce on Sun Oct 13 01:55:15 2013
    Re: C++ past, present, and future
    By: Deuce to Nightfox on Wed Oct 09 2013 20:56:05

    Hrm? What's that? I thought C++ was supposed to be source compatible with C. With an auto variable type, it sounds like the following would mean something different:

    int main(int argc, char **argv)
    {
    auto i;

    for(i=0; i<argc; i++);
    }

    C++ is source-compatible with C in that you can compile C code in a C++ app, but necessarily not the other way around. I haven't used the 'auto' keyword in C++ yet, but it sounds like the compiler will infer the variable's type based on what's assigned to it.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Deuce@VERT/SYNCNIX to Nightfox on Sun Oct 13 05:54:54 2013
    Re: C++ past, present, and future
    By: Nightfox to Deuce on Sat Oct 12 2013 06:55 pm

    C++ is source-compatible with C in that you can compile C code in a C++
    app, but necessarily not the other way around. I haven't used the 'auto' keyword in C++ yet, but it sounds like the compiler will infer the variable's type based on what's assigned to it.

    Right, and that's NOT what it does in C. This would be a case of legal C code not compiling in C++ (actually, compiling to a different meaning).

    ---
    http://DuckDuckGo.com/ a better search engine that respects your privacy.
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Nightfox@VERT/DIGDIST to Deuce on Sun Oct 13 23:06:43 2013
    Re: C++ past, present, and future
    By: Deuce to Nightfox on Sat Oct 12 2013 22:54:54

    Right, and that's NOT what it does in C. This would be a case of legal C code not compiling in C++ (actually, compiling to a different meaning).

    I didn't realize an 'auto' keyword had been added to C.. I looked it up just now, and you're right - it has a differnt meaning. I'm surprised they'd give it a different meaning in both languages. Perhaps someone on the design committee(s) didn't think it out completely..

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Deuce@VERT/SYNCNIX to Nightfox on Mon Oct 14 18:58:42 2013
    Re: C++ past, present, and future
    By: Nightfox to Deuce on Sun Oct 13 2013 04:06 pm

    I didn't realize an 'auto' keyword had been added to C.. I looked it up
    just now, and you're right - it has a differnt meaning. I'm surprised they'd give it a different meaning in both languages. Perhaps someone on the design committee(s) didn't think it out completely..

    Well, it was always there, but the only place it's legal, it's also the default, so almost no C code has ever been written that uses the auto keyword.

    Regardless, C++ could have used something else to avoid conflict.

    ---
    http://DuckDuckGo.com/ a better search engine that respects your privacy.
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Nightfox@VERT/DIGDIST to Deuce on Sat Oct 19 14:50:54 2013
    Re: C++ past, present, and future
    By: Deuce to Nightfox on Mon Oct 14 2013 11:58:42

    I didn't realize an 'auto' keyword had been added to C.. I looked it

    Well, it was always there, but the only place it's legal, it's also the default, so almost no C code has ever been written that uses the auto keyword.

    Regardless, C++ could have used something else to avoid conflict.

    I agree, it would have been better for C++ to use something different. There are other keywords that mean slightly different things in C and C++ as well..

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com