Next version of C++ as ambigous as today?

Discussion in 'C++' started by JohnQ, Jun 22, 2007.

  1. JohnQ

    JohnQ Guest

    Is there any effort being made to move C++ toward having a less ambigous
    grammer/closer to LALR(1)?

    John
     
    JohnQ, Jun 22, 2007
    #1
    1. Advertising

  2. JohnQ wrote:
    > Is there any effort being made to move C++ toward having a less
    > ambigous grammer/closer to LALR(1)?


    I think you should ask that in 'comp.std.c++'. The standardization
    procedures are discussed there.

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
     
    Victor Bazarov, Jun 22, 2007
    #2
    1. Advertising

  3. JohnQ

    Ira Baxter Guest

    "JohnQ" <> wrote in message
    news:Z9Uei.3299$...
    > Is there any effort being made to move C++ toward having a less ambigous
    > grammer/closer to LALR(1)?


    If anything, it is likely to be much worse.
    They can't dump backwards compatibility, so the existing
    parse ambiguities are likely to stay, and they
    are shoehorning more features into the dark
    syntax corners of the language, so there are
    likely to be more complications.

    Of course, a miracle might occur.
    I wouldn't count on it.

    The real cure is to use a stronger parsing technology than
    LALR, such as GLR. Our C++ front end
    uses this quite successfully. The ambiguities
    are still there, but they can be managed.


    --
    Ira Baxter, CTO
    www.semanticdesigns.com
     
    Ira Baxter, Jun 23, 2007
    #3
  4. JohnQ

    JohnQ Guest

    "Ira Baxter" <> wrote in message
    news:...
    > "JohnQ" <> wrote in message
    > news:Z9Uei.3299$...
    >> Is there any effort being made to move C++ toward having a less ambigous
    >> grammer/closer to LALR(1)?

    >
    > If anything, it is likely to be much worse.
    > They can't dump backwards compatibility, so the existing
    > parse ambiguities are likely to stay, and they
    > are shoehorning more features into the dark
    > syntax corners of the language, so there are
    > likely to be more complications.


    Complexity grows on complexity. I hear ya.

    >
    > Of course, a miracle might occur.
    > I wouldn't count on it.


    That backward compatibility thing is a real bitch huh.

    >
    > The real cure is to use a stronger parsing technology than
    > LALR, such as GLR. Our C++ front end
    > uses this quite successfully. The ambiguities
    > are still there, but they can be managed.


    Or to avoid those ambiguities in a subset of C++ with a slightly modified
    syntax (use <[]> for templates, for example), call it something else and
    offer it to those who don't have a care about backward compatibility.

    I read the first half or so of Stroustrup's "D&E" yesterday again and I for
    one would not want to go through all the drudgery that the inventors of C++
    did as it seems a herculean effort. The nice thing is though, to invent a
    "new" language in the likeness of C++, one doesn't have to (!) for it's
    already been done and the knowledge is reusable. After all these years, and
    in reading certain passages in D&E, it's nice to know that, even though I
    may be in the minority (or obscurity!), that there are others who voiced
    opinions for things that went the other way with C++. A lot of good choice
    were made. A few really bad ones were though too. The few "bad" ones are
    enough to leave one wanting an "incrementally" better C++ (hehe, ++C++...
    C++ should have been ++C, preincrement/then, leaving C++ for post
    increment/now). What is one of those things you ask? Classes and structs
    being the same. But that's easier to say now, surely, than it was back then.
    But that's the point: a lot has been learned since then, but can't be
    realized because of this "backward compatibility" thing. Solution: a "new"
    language ("in the likeness of C++).

    Let's see.. how would that go... Ooo I know, use C++ as a frontend of the
    compiler for the new language. "C++Front". Well isn't that a novel idea. ;)

    John
     
    JohnQ, Jun 24, 2007
    #4
  5. On Jun 24, 12:08 am, "JohnQ" <>
    wrote:
    .... The nice thing is though, to invent a
    > "new" language in the likeness of C++, one doesn't have to (!) for it's
    > already been done and the knowledge is reusable. After all these years, and
    > in reading certain passages in D&E, it's nice to know that, even though I
    > may be in the minority (or obscurity!), that there are others who voiced
    > opinions for things that went the other way with C++.


    The most successful C++ projects I've seen declare from the start the
    subset of the language allowed to be used in the project. This
    document is called the "code conventions", is written by the most
    experienced programmers in the project and is used a guide during
    every code review done before any check-in.

    Another alternative is to use language D. http://www.digitalmars.com/d/
     
    Guillermo Schwarz, Jun 28, 2007
    #5
    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. Mohammed  A khader

    Ambigous operator '&'

    Mohammed A khader, Apr 20, 2005, in forum: VHDL
    Replies:
    8
    Views:
    905
    Mike Treseler
    Apr 24, 2005
  2. =?Utf-8?B?Q29hY2g=?=
    Replies:
    0
    Views:
    517
    =?Utf-8?B?Q29hY2g=?=
    Jun 8, 2006
  3. Deniz Bahar
    Replies:
    2
    Views:
    512
    Andrey Tarasevich
    Mar 9, 2005
  4. V Green
    Replies:
    0
    Views:
    923
    V Green
    Feb 5, 2008
  5. PA Bear [MS MVP]
    Replies:
    0
    Views:
    1,034
    PA Bear [MS MVP]
    Feb 5, 2008
Loading...

Share This Page