Anyone else feel like C++ is getting too complicated?

Discussion in 'C++' started by Zachary Turner, Mar 19, 2009.

  1. Zachary  Turner

    Tony Guest

    "The entire std lib uses them" is hardly a selling point!
    Or patching up (bandaging) a feature lacking or under-developed in the
    language?

    ********

    RFP: Separate thread for discussion, analysis, politics of C++ concepts.
    High level discussion first recommended (as in, maybe the whole
    template/concept subsystem could be eliminated with a higher level
    architecture).

    Tony
     
    Tony, Apr 12, 2009
    #81
    1. Advertisements

  2. Zachary  Turner

    Tony Guest

    Sounds like the solution is to stick with passing in a comparison function
    pointer to the container since the alternatives become complex quickly.
     
    Tony, Apr 25, 2009
    #82
    1. Advertisements

  3. Zachary  Turner

    Tony Guest

    "finally"??? Most recently the relational model has had some competition in
    "certain" domains where the complexity of the relational model is overkill:
    See,
    http://www.infoworld.com/d/data-management/slacker-databases-break-all-old-rules-599.
    The question becomes, "what is the *simple solution* that will surface after
    concepts?".
     
    Tony, Apr 25, 2009
    #83
  4. Zachary  Turner

    Jerry Coffin Guest

    This isn't really much of a solution. Just for one example, it's how
    qsort (from the C standard library) works. Problems include:

    1) slow (e.g. std::sort is often three times as fast)
    2) not type safe (comparison function receives pointers to void...)
    3) complex to use (at least in the case of qsort)

    It may be possible to work around the third to some degree (e.g. using
    template tricks to determine element size) but the first two are much
    more difficult problems.

    It's certainly possible to produce vaguely template-like capabilities
    using, for one example, macros -- in fact, some of us have done exactly
    that. Long ago, before templates were part of the language, there was a
    header called generic.h that allowed a degree of generic programming
    without templates. This certainly reduces the complexity of the language
    -- but it drastically _increased_ the complexity of programs written in
    that language. It was a lousy tradeoff then, and it wouldn't be any
    better now.
     
    Jerry Coffin, Apr 27, 2009
    #84
  5. Zachary  Turner

    Jerry Coffin Guest

    I've already seen it. At least to me, it appears that the author thinks
    "relational" equates to "SQL". This isn't really true. While it's
    certainly true that these depart from the SQL database in various ways,
    they all still follow the relational model to a fairly large degree.

    Other than that, it's generally true that the relational model is rather
    a "middle of the road" solution. A more free-form database tends to give
    more flexibility at the expense of computing efficiency. A more
    restricted model (e.g. hierarchical) tends toward the opposite. Both
    have their uses, but neither appears likely to really dominate any time
    soon.

    It is, however, true that "finally" was probably a poor choice of words
    -- the relational model (or some imitation of it) has dominated database
    development for four decades or so, but even a complete implementation
    probably wouldn't be the final stage of database development. The trend
    toward cheaper computing power favors flexibility over efficiency.
    I doubt that question has much relevance. Even if you could figure out
    what language features (and such) were going to be used, say, 50 years
    from now, I doubt it'd be much use. Trying to use that future language
    on current hardware would be a bit like trying to run a current C++
    compiler on an Apple II+ with 32K of RAM and 140K floppy disks.
     
    Jerry Coffin, Apr 27, 2009
    #85
  6. Zachary  Turner

    Guest Guest

    almost sig material!

    :)
     
    Guest, Apr 28, 2009
    #86
  7. Zachary  Turner

    Guest Guest

    Jacob, you're not the only one with code stranded in this way.
    Or variations there of. In my case typename.

    in our case not all the code is ours we have third party libraries.
    We don't have the source code. Hacking someone else's header files
    fills
    me with...
     
    Guest, Apr 28, 2009
    #87
  8. Zachary  Turner

    Tony Guest

     
    Tony, Apr 28, 2009
    #88
  9. Zachary  Turner

    Jerry Coffin Guest

    [ ... ]
    I hesitate to predict the future -- it has a habit of ignoring what
    seems to make sense, at least to me, and doing what it will.
    That, however, is an easy prediction to make -- for the simple reason
    that it's essentially a tautology. Essentially by definition, the only
    way it's exotic is that it is for exceptional cases or restricted
    environments.
    The design of a general-purpose language (by definition) can't take the
    application or platform into account, so this is basically just
    predicting more use of special-purpose languages, which I think is
    probably correct.

    As far as general-purpose languages go, however, I don't think it'll be
    reasonable to completely neglect things like performance of containers
    any time soon. It's been predicted for decades, but reality hasn't
    followed suit.
    I agree with this statement -- but it could have been made anytime over
    the last 50 years and been equally true!
     
    Jerry Coffin, Apr 29, 2009
    #89
  10. Zachary  Turner

    Tony Guest

    The suggestion of course was that use of C++ today is an exotic but the
    nicer thing is just not yet available.
    'twas what I was kinda alluding to, yes, but certainly not the emphasis on
    "special purpose", as they will be "practically general purpose" rather than
    "extremely general purpose".
    But the GP languages of today are the exotics.
    The fact that so many languages have been developed and are still be
    developed does not bode well for the GP language pursuit: apparently "GP
    language" is an oxymoron.
     
    Tony, May 2, 2009
    #90
  11. Zachary  Turner

    Jerry Coffin Guest

    [ ... ]
    It isn't exotic as long as it's used in lots of mainstream applications.
    That hasn't happened to C++ yet, and I'm not sure it will any time soon.
    It will undoubtedly happen sometime, but exactly how soon I'm uncertain.
    There aren't many languages around (right now) that could replace C++ in
    a lot of applications, and the few that realistically _could_ (e.g. Ada
    95) strike me as extremely unlikely to do so. Of course, at least in
    theory, you could write anything in almost any language if you wanted to
    badly enough -- but I can't quite imagine anybody deciding to write a
    JVM in Lisp, a graphics engine in COBOL, or an operating system kernel
    in Fortran.

    [ ... ]
    Well, there are certainly a number of applications (e.g. network stuff)
    where the performance of something like Java or Perl is perfectly
    adequate for quite a few purposes. These certainly form a large class of
    applications, but I don't see them growing to the point that they really
    relegate C++ to "exotic" status anytime soon.
    In that case, I can only guess that you're defining "exotic" rather
    differently than anybody else I know about.

    At one time, for a short while, C++ was a "hot" language -- claimed by
    many to be the cure of all the ills of programming in general. That made
    it a default choice of languages for a lot of projects to which it was,
    quite frankly, not particularly well suited (including some for which it
    was really poorly suited). The language of the month club being how it
    is, however, that dubious honor has long since passed on to other
    languages. As such, C++ is now more often chosen for other reasons. That
    has undoubtedly reduced its usage somewhat, but not nearly to the point
    that I can imagine calling it exotic -- and the same is true for most of
    the other general purpose languages as well.

    [ ... ]
    Two basic points: first of all, you're right to a limited degree -- not
    really about the languages themselves, but about the terminology.
    Nothing (C++ or anything else) is equally suited to every possible task.
    At the same time, the use for C++ and similar languages still exists;
    the language remains useful regardless of the fact that I don't know of
    a way to describe the type of situation for which it's best suited in a
    word or two. The problem there is that despite it's not being entirely
    general purpose, the tasks for which it is well suited vary over a
    rather wide range.
     
    Jerry Coffin, May 5, 2009
    #91
  12. Zachary  Turner

    Tony Guest

    No, that is not correct. (See "Holocaust").
    You are thinking way too narrowly: you chose an IT (read: within the
    forrest) "domain". Think out of the box.
    But you don't know anyone else (but yourself), do you? ;) (?)
    I remember that! I "had learned" C (read made low-volume production programs
    in C, having suffered with handed-down handed-over "engineered" (code not
    engineered, but made by engineers not of the IT variety) FORTRAN and even
    BASIC ) and was "burning it in to my mind or trying to find the "what am I
    missing in all this?"" via (available at my place of employment) video tapes
    from Borland featuring David Intersimone! (I'd time-travel back, (in a
    second! (not for a second!)) then for a few of the girls that actually
    wanted something with me! Yowza!). Some people were suggesting I should
    "take a look at C++". I did, a few years later, as it was a natural
    progression..... long story short, now I'm here to perturb y'all. ;)
    Do you think that it is the solution to the H1N1 virus? If I didn't know
    English, reading this NG would lead me to "BELIEVE" (REPENT! Ye all
    sinners... REPENT!) that C++ could defeat Megalon. (Aside: Is Infra Man
    still living?).
    [got A LOT of money for "consultantcies"!]
    What? ... What??? I thought C was a GENERAL PURPOSE language. (WTF?!).
    (Lawsuits abound).
    But it was the old timer! (Go figure).
    History has repeated itself and we are talking about history.
    Are you sad?
    "Death and taxes". (DEATH, and taxes?? (see: Joe Black)).
    May I have some "peanut butter"? I find it astonishingly good.

    [Epitaph snipped]
     
    Tony, May 8, 2009
    #92
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.