C++ 0x size and complexity

Discussion in 'C++' started by Ioannis Vranos, Feb 17, 2009.

  1. C++0x being relatively close to ratification (2-3 years), what do you
    think of its new core language facilities and the new standard library?

    Personally, I do not care much for the size of the standard library, but
    I am concerned about the new language features.

    I think, it looks like using C++0x will be like "rocket science".


    --
    Ioannis Vranos

    C95 / C++03 Developer

    http://www.cpp-software.net
     
    Ioannis Vranos, Feb 17, 2009
    #1
    1. Advertising

  2. * Ioannis Vranos:
    > C++0x being relatively close to ratification (2-3 years), what do you
    > think of its new core language facilities and the new standard library?
    >
    > Personally, I do not care much for the size of the standard library, but
    > I am concerned about the new language features.
    >
    > I think, it looks like using C++0x will be like "rocket science".


    It just need Good New Books.

    Books that introduce one logical subset or logical "extension" at a time.

    In the standard it's all scattered in small pieces, that's my main problem.


    Cheers, just my 2 øre,

    - Alf
     
    Alf P. Steinbach, Feb 17, 2009
    #2
    1. Advertising

  3. Ioannis Vranos wrote:
    > C++0x being relatively close to ratification (2-3 years), what do you
    > think of its new core language facilities and the new standard library?
    >
    > Personally, I do not care much for the size of the standard library, but
    > I am concerned about the new language features.
    >
    > I think, it looks like using C++0x will be like "rocket science".



    A related video (legal direct download link):


    "An Overview of the Coming C++ (C++0x) Standard"

    http://tinyurl.com/ddz3ef




    --
    Ioannis Vranos

    C95 / C++03 Developer

    http://www.cpp-software.net
     
    Ioannis Vranos, Feb 17, 2009
    #3
  4. Ioannis Vranos

    SG Guest

    On 17 Feb., 16:14, Ioannis Vranos <> wrote:
    > C++0x being relatively close to ratification (2-3 years), what do you
    > think of its new core language facilities and the new standard library?
    >
    > Personally, I do not care much for the size of the standard library, but
    > I am concerned about the new language features.


    Deciding what to add to the (core) language and what not is
    understandibly not easy. If you need to retain compatibility to C++03
    it's even harder, I suppose. You would want to pick only the most
    "important" features and try to solve other "issues" with libraries as
    much as possible.

    If I had to pick features of questionable benefit it would probably be
    - uniform initialization
    - alternate function syntax

    The number of times I needed to initialize some container object with
    a list of values is near zero and I fail to imagine many use cases. I
    fear that this feature will just add to the initialization confusion
    and that it will introduce new ambiguities w.r.t. overloaded
    constructors programmers might not anticipate.

    As for the alternate functon syntax I don't think that it's of great
    use either. It will probably be rarely used in some non-template
    contexts and/or used by those who don't like the concepts feature.

    I'm not sure about the lambda proposal. In comparison to Boost.Lambda
    the proposed lambda feature forces you to name the parameters' types.
    But other than that it seems like it could make the "STL approach"
    more popular (std::transform, ...).

    The new features that I personally find most interesting are: rvalue
    references and concepts. If you like to write fast and generic
    library code they are of great use. No more cryptic template tricks
    (SFINAE & other concepts emulation hacks). Rvalue references will
    probably make pass-by-value more popular again which is a good. You
    might want to utilize rvalue references if expression templates are
    too complicated for you. Also, expression templates whose purpose it
    is to *transparently* improve püerformance don't seem to go well with
    the new type inference feature "auto". I'm not an expert on
    expression templates, though.


    Cheers!
    SG
     
    SG, Feb 17, 2009
    #5
  5. Ioannis Vranos

    Jerry Coffin Guest

    In article <gnek7r$tmk$>,
    says...
    > C++0x being relatively close to ratification (2-3 years), what do you
    > think of its new core language facilities and the new standard library?
    >
    > Personally, I do not care much for the size of the standard library, but
    > I am concerned about the new language features.
    >
    > I think, it looks like using C++0x will be like "rocket science".


    I would say rather the opposite. One of the major side-effects of adding
    Concepts is that template error messages will generally become a great
    deal more readable. This will frequently make the language much more
    approachable. Likewise, making ">>" to be equivalent to "> >" for
    enclosing template arguments will keep a lot of beginners from running
    into strange error messages.

    Rvalue references will be a bit the same way -- right now, the most
    obvious way to write some code is terribly inefficient. With rvalue
    references, you'll be able to avoid a lot of contortions currently made
    in the name of efficiency.

    To make a long story short, C++ 0x will make the language simpler and
    more straightforward for most people to use most of the time.

    --
    Later,
    Jerry.

    The universe is a figment of its own imagination.
     
    Jerry Coffin, Feb 18, 2009
    #6
  6. Jerry Coffin wrote:
    >
    > I would say rather the opposite. One of the major side-effects of adding
    > Concepts is that template error messages will generally become a great
    > deal more readable. This will frequently make the language much more
    > approachable. Likewise, making ">>" to be equivalent to "> >" for
    > enclosing template arguments will keep a lot of beginners from running
    > into strange error messages.
    >
    > Rvalue references will be a bit the same way -- right now, the most
    > obvious way to write some code is terribly inefficient. With rvalue
    > references, you'll be able to avoid a lot of contortions currently made
    > in the name of efficiency.
    >
    > To make a long story short, C++ 0x will make the language simpler and
    > more straightforward for most people to use most of the time.



    OK, for application developers, I will probably agree (I will be sure
    when I see C++0x in practice).

    However, for library writers, or for people who "want to know the whole
    language", I think things will be complicated.

    Until now, we have the "selective ignorance" approach in C++. That is,
    although you may know the whole language, be as high level as you can
    be, and ignore the implementation details as long as your project
    doesn't need them (e.g. the possible implementation of standard
    manipulators).

    For example, will a newcomer be able to understand and learn all the new
    core language features? And I am not talking about the auto keyword, or
    the list<vector<T>> (consecutive '>'s) stuff.

    And for a complete newcomer, will it be possible to learn the whole
    language (including the standard library) from scratch?

    I think, C++ may be "broken by its weight" (massive core language
    features/standard library).

    I am concerned that C++0x may be the "C99" failure of C++03, or even worse.


    --
    Ioannis Vranos

    C95 / C++03 Developer

    http://www.cpp-software.net
     
    Ioannis Vranos, Feb 18, 2009
    #7
  7. Hi,

    > However, for library writers, or for people who "want to know the whole
    > language", I think things will be complicated.


    The language shall stay as compatible as possible, have new features and by
    the way become simpler in the whole? How can that work except for very basic
    stuff like ">>" instead of "> >"?

    > Until now, we have the "selective ignorance" approach in C++. That is,
    > although you may know the whole language, be as high level as you can
    > be, and ignore the implementation details as long as your project
    > doesn't need them (e.g. the possible implementation of standard
    > manipulators).
    > [...]
    > And for a complete newcomer, will it be possible to learn the whole
    > language (including the standard library) from scratch?


    That "selective ignorance" approach doesn't get lost with C++0x.

    Christof
     
    Christof Donat, Feb 19, 2009
    #8
  8. Ioannis Vranos

    SG Guest

    On 19 Feb., 13:28, Christof Donat <> wrote:
    > > However, for library writers, or for people who "want to know the whole
    > > language", I think things will be complicated.

    >
    > The language shall stay as compatible as possible, have new features and by
    > the way become simpler in the whole? How can that work except for very basic
    > stuff like ">>" instead of "> >"?


    Why did you quote that part? You seem to agree with him.

    The "> >" issue is not the only improvement beginners will benefit
    from:

    - better error messages for templated code (concepts)
    - easier iteration over containers' values (for-range loop, auto)
    - improved type safety (nullptr, enum classes, deleted functions)
    - better expression of intention (deleted/defaulted functions, no
    need for many obscure "template tricks" anymore due to concepts)

    These are just things that come to mind while skimming through the
    language feature list of the C++0x Wikipedia article...

    The language gets bigger (duh!) but it also get's simpler to work
    with -- hopefully ;-) -- because it adds features that make some
    tricks and workarounds obsolete, improve uniformity, and lead to
    code that expresses a programmer's intention more clearly.


    Cheers!
    SG
     
    SG, Feb 19, 2009
    #9
  9. Ioannis Vranos

    Bo Persson Guest

    Ioannis Vranos wrote:
    >
    > And for a complete newcomer, will it be possible to learn the whole
    > language (including the standard library) from scratch?


    How else would he do it? :)

    >
    > I think, C++ may be "broken by its weight" (massive core language
    > features/standard library).


    This hasn't stopped Java or C#, has it?

    People who don't complain about the huge size of the standard library,
    usually complain about all the stuff that is missing!

    >
    > I am concerned that C++0x may be the "C99" failure of C++03, or
    > even worse.


    We'll see.


    Bo Persson
     
    Bo Persson, Feb 19, 2009
    #10
  10. Ioannis Vranos

    Jerry Coffin Guest

    In article <>, says...

    [ ... ]

    > People who don't complain about the huge size of the standard library,
    > usually complain about all the stuff that is missing!


    Even the people who DO complain about it being too big STILL complain
    about it missing coverage of X, Y and Z that everybody clearly needs!

    --
    Later,
    Jerry.

    The universe is a figment of its own imagination.
     
    Jerry Coffin, Feb 19, 2009
    #11
  11. Ioannis Vranos

    Stefan Ram Guest

    "Bo Persson" <> writes:
    >People who don't complain about the huge size of the standard library,
    >usually complain about all the stuff that is missing!


    I know one of those guys, first, here, he claimed C++ would be
    »too large« and »too complicated«, later he complained about the
    lack of libraries for »webbish things«.

    »C++ is already too large and complicated for our taste«

    From: (Bjarne Stroustrup)
    Newsgroups: comp.lang.c++,comp.std.c++
    Subject: Re: C++ Language Extensions
    Message-ID: <>

    »We need C++ libraries for doing "Webbish" things. (...)
    I don't know if such C++ Web-service support libraries
    exist or are being built, but I'd like to see some.«

    http://www.research.att.com/~bs/omo_interview.html

    I wrote my opinion on this topic in:

    http://www.purl.org/stefan_ram/pub/c _standard_extensions_en
     
    Stefan Ram, Feb 19, 2009
    #12
  12. Ioannis Vranos

    Stefan Ram Guest

    Jeff Schwab <> writes:
    >Bjarne was said only that webbish libraries should be made available,
    >not that they should be included in the standard library.


    I was aware of this, but ignored it for the dramatic effect.

    >>http://www.purl.org/stefan_ram/pub/c _standard_extensions_en

    >HTTP/1.1 403 Access Denied.


    Sorry. I have some settings in effect that should exclude
    bots, but sometimes also exclude human readers. So, when I
    post a URI, I add it to a special list, to temporarily
    allow access by nearly everyone:

    SetEnvIf request_uri "standard_extensions_en$" alow_all=1

    I do not know why you still get »403«, so I copy the text of
    the page here (The rest of this post is a fullquote of this page):

    http://www.purl.org/stefan_ram/pub/c _standard_extensions_en
    (canonical URI).

    Stefan Ram

    Suggestion for C++ Standard Extension Library
    Specifications

    »We need C++ libraries for doing "Webbish" things.«

    Bjarne Stroustrup

    http://public.research.att.com/~bs/omo_interview.html

    The C++ -standard library does not contain means to get
    the resource of a URI. One of the reasons for this might
    be that it is not possible to implement such a feature
    under every environment. However, the lack of
    standardization in this regard means that multiple
    solutions with incompatible interfaces will be developed
    for this purpose and C++ source code will have to take
    care for multiple interfaces if it is intended for
    different environments.

    Therefore, it is suggested to add standard extension
    library specifications to the C++ specification, which
    describe the interfaces of extension libraries. These
    libraries do not have to be part of a C++ implementation,
    but a C++ implementation might support a library extension
    and if its description claims to support the extension
    library, then this extension library has to comply with
    the specified interface. For example, a library to obtain
    resources via a network might be specified as "ISO C++
    Network Resource Extension Library Specification 1.0".
    A producer of C++-implementations then might claim that
    his product supports the "ISO C++ Network Resource
    Extension Library Specification 1.0". A C++-program
    might be written that requires this extension. Such a
    program will not be portable among all conforming hosted
    implementations, but among all implementations supporting
    this standard library extension.

    A set of extension library specifications might be
    specified as "Standard Library Extension Set, Level 1
    (2005)" to contain standard library extensions with
    features available under many environments, like a console
    library with the ability to detect key-press-events or a
    network library. A higher level extension set might
    contain a GUI library. Profiles for certain types of
    devices, like "Desktop Internet PC Standard Library
    Extension Set" are also possible. C++ already has two
    such "library levels" now, namely, the freestanding and
    the hosted implementations.

    Such extension libraries specifications should be
    documents separated from the C++ standard, so that the
    core language can be kept relatively small. In a very wide
    sense the goal of this suggestion is to create something
    like CPAN for C++, but while CPAN is a collection of
    implementations the suggested extension library
    specifications would only specify interfaces. Programmers
    then can bind their software to these interfaces while
    implementations might be available as part of C++
    -implementations or as separate units.

    J16/01-0028 = WG21 N1314

    After writing the above suggestion, I became aware that
    parts of it already are shared by the library WG of
    ISO/IEC JTC1/SC22/WG21, the international standardization
    working group for the programming language C++. The
    document "J16/01-0028 = WG21 N1314" contains the following
    paragraph.

    »Library extensions will be considered even if they
    cannot be implemented on every platform. For example:
    there are platforms that can support a hosted C++
    implementation, but that do not support threads or network
    communication. Libraries for networking and multithreading
    will be considered, even though they can't be implemented
    on such platform.«

    J16/01-0028 = WG21 N1314, as of 2001-05-17

    http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2001/n1314.htm

    Lack of Portable Libraries Reported

    The Journal COTS reports that the military migrates away
    from Ada towards Java. The portable libraries of Java are
    recognized as an edge over C++.

    »Another advantage Java offers is a broad selection of
    standard, portable and scalable libraries. That's where
    it has an edge over C++. While C++ has some good
    libraries, they're not portable—one set of libraries is
    needed with Windows, a different set is needed for
    Solaris, and yet another for Linux.«

    Jeff Child

    http://www.cotsjournalonline.com/pdfs/2003/07/COTS07_softside.pdf
     
    Stefan Ram, Feb 19, 2009
    #13
  13. Stefan Ram wrote:
    >
    > Sorry. I have some settings in effect that should exclude
    > bots, but sometimes also exclude human readers. So, when I
    > post a URI, I add it to a special list, to temporarily
    > allow access by nearly everyone:


    So, what you are essentially saying is that BS once said that "C++ is
    already too large and complicated for our taste" (do you have a link or
    other reference for that?), and another time he said "We need C++
    libraries for doing "Webbish" things".


    In addition to the fact that I agree with Jeff Schwab that "Bjarne was
    said only that webbish libraries should be made available, not that they
    should be included in the standard library", considering the C++03
    standard library large, doesn't mean it also has not some mssing
    features at specific areas.


    --
    Ioannis Vranos

    C95 / C++03 Developer

    http://www.cpp-software.net
     
    Ioannis Vranos, Feb 20, 2009
    #14
  14. Ioannis Vranos wrote:
    > Stefan Ram wrote:
    >>
    >> Sorry. I have some settings in effect that should exclude
    >> bots, but sometimes also exclude human readers. So, when I post a
    >> URI, I add it to a special list, to temporarily
    >> allow access by nearly everyone:

    >
    > So, what you are essentially saying is that BS once said that "C++ is
    > already too large and complicated for our taste" (do you have a link or
    > other reference for that?), and another time he said "We need C++
    > libraries for doing "Webbish" things".
    >
    >
    > In addition to the fact that I agree with Jeff Schwab that "Bjarne was
    > said only that webbish libraries should be made available, not that they
    > should be included in the standard library", considering the C++03
    > standard library large, doesn't mean it also has not some mssing
    > features at specific areas.


    I also seriously doubt that BS said "C++ is already too large and
    complicated for our taste", so I would like a reference please.


    --
    Ioannis Vranos

    C95 / C++03 Developer

    http://www.cpp-software.net
     
    Ioannis Vranos, Feb 20, 2009
    #15
  15. Ioannis Vranos

    Stefan Ram Guest

    Ioannis Vranos <> writes:
    >I also seriously doubt that BS said "C++ is already too large and
    >complicated for our taste", so I would like a reference please.


    I posted the MID, and was able to locate the post with that
    MID using Google. If you don't know what a »MID« is or have
    problems to derefer a MID, please let us know, so that someone
    can provide assistance to you.
     
    Stefan Ram, Feb 20, 2009
    #16
  16. Jeff Schwab wrote:
    > Ioannis Vranos wrote:
    >> I also seriously doubt that BS said "C++ is already too large and
    >> complicated for our taste", so I would like a reference please.

    >
    > It's from "a letter published on behalf of the extensions working group
    > of the C++ standards committee." Even if the quote isn't technically
    > Stroustrup, the sentiment is. See section 7.2.3:
    >
    > http://www.scribd.com/doc/3660254/A-History-of-C-19791991



    That is 7 years before the first official C++ standard, when C++ was
    still being under construction and basically a research project (both
    BS's and C++ committee's).

    That is too old, and using that you are just spoiling our conversation.



    >
    > See also:
    >
    > http://www.research.att.com/~bs/bs_faq.html#really-say-that
    >
    > "Within C++, there is a much smaller and cleaner
    > language struggling to get out".



    Here BS talks about the newer and better C++ facilities to be used,
    rather than the old C-style facilities.


    >
    > He's right, too. The problem is that getting to the smaller, cleaner
    > language would mean dropping a bunch of stuff that is necessary for C
    > compatibility, or was necessary to work around C. C++ has such verbose,
    > punctuation-laden syntax largely because all the good syntax was taken
    > by C. Since dropping C compatibility is not a realistic (nor
    > necessarily desirable) option, the formal definition of C++ will
    > probably continue to grow even more complicated; however, that's not the
    > end of the world. The vast majority of code written by any given
    > developer probably stays within a relatively small subset of the
    > language, but when you need the other stuff, it's there. The one pang I
    > personally feel about the complexity of C++ is that it presents such a
    > huge bar to the development of new tools for working with the language.
    > Every high school kid and his dog seem to be writing tools for
    > manipulating the syntactically simpler languages.



    We are talking about C++0x, while you are questioning the widely
    accepted C++98/03 in a distorting the facts way.

    Please stay on topic (the new features of C++0x), and try to be accurate
    and honest.



    --
    Ioannis Vranos

    C95 / C++03 Developer

    http://www.cpp-software.net
     
    Ioannis Vranos, Feb 20, 2009
    #17
  17. Ioannis Vranos

    arnuld Guest

    > On Feb 19, 11:28 pm, "Bo Persson" <> wrote:
    >> Ioannis Vranos wrote:
    > > I think, C++ may be "broken by its weight" (massive core language
    > > features/standard library).


    > This hasn't stopped Java or C#, has it?


    yes, Bo.. you are right :)
     
    arnuld, Feb 20, 2009
    #18
  18. arnuld wrote:
    >> On Feb 19, 11:28 pm, "Bo Persson" <> wrote:
    >>> Ioannis Vranos wrote:
    >>> I think, C++ may be "broken by its weight" (massive core language
    >>> features/standard library).

    >
    >> This hasn't stopped Java or C#, has it?

    >
    > yes, Bo.. you are right :)


    "Java" and C# (C#/CLI) are just front-ends for their frameworks (Java
    Virtual Machine, .NET framework) respectively.

    C++ is stand-alone, and can also interact with third party
    frameworks/libraries (.NET framework, Qt, etc).


    --
    Ioannis Vranos

    C95 / C++03 Developer

    http://www.cpp-software.net
     
    Ioannis Vranos, Feb 20, 2009
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frank D. Greco
    Replies:
    0
    Views:
    356
    Frank D. Greco
    Feb 15, 2005
  2. Paul Keating
    Replies:
    3
    Views:
    502
    Paul Keating
    Jun 26, 2004
  3. Lionel B
    Replies:
    26
    Views:
    1,092
    P.J. Plauger
    Feb 3, 2007
  4. Harald Luessen
    Replies:
    7
    Views:
    291
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Jun 27, 2007
  5. Jason Cavett

    Preferred Size, Minimum Size, Size

    Jason Cavett, May 23, 2008, in forum: Java
    Replies:
    5
    Views:
    12,733
    Michael Jung
    May 25, 2008
Loading...

Share This Page