Remix.run Logo
IAmLiterallyAB 2 hours ago

> Herb side that proposes minimal changes

Herb is developing a whole second syntax, I wouldn't call that minimal changes. And probably the only way to evolve the language at this point, because like you said Sean is introducing a different language entirely, so its not C++ at that point.

I really like some of Herb's ideas,but it seems less and less likely they'll ever be added to C++

darknavi 2 hours ago | parent [-]

Have you seen some of his recent talks? Lots of underpinnings of cppfront have been added or are in committy.

He compares it to the JS/TS relationship.

nox101 an hour ago | parent | next [-]

It's not really a valid comparison though. cppfront is a different language that just happens to be compatible with C++. ts/js is were ts is just js with types. You can comment out the types and it just runs. cppfront's language you'll actually have to re-write the code to get it to compile in C++

typescript

    function add(a: number, b: number): number { return a + b };
javascript

    function add(a/*: number*/, b/*: number*/)/*: number*/ { return a + b };
cppfront

    add: (a: float, b: float): float = { a + b; }
cpp

    float add(float a, float b) { return a + b; }
HelloNurse an hour ago | parent [-]

Do you realize that the Typescript example contains strictly more information than the Javascript one (namely, declarations for the type of three things) and is therefore more complex to compile, while the two C++ examples are semantically identical (the last expression in the function is returned implicitly without having to write "return") and the new syntax is easier to parse?

pjmlp an hour ago | parent | prev [-]

Nope, that is mostly sales pitch, the only thing added thus far has been the spaceship operator.

He also sells the language differently from any other language that also compiles to native via C++, like Eiffel and Nim among others, due to conflict of interest to have WG21 chair propose yet another take on C++.