News for hackers. Stuff that matters.
Re:Carbon Language: An experimental successor to C++ by zamalek on Tuesday July 19, 2022 @11:48AM (#32153332)
Like every braces language following C is a C rip-off?

Rusty syntax is objectively superior to almost everything else we've come up with, there's no reason it shouldn't be copied.

Re:Carbon Language: An experimental successor to C++ by nineteen999 on Tuesday July 19, 2022 @12:23PM (#32154018)
> Rusty syntax is objectively superior to almost everything else we've come up with, there's no reason it shouldn't be copied.

You mispelled "subjectively". Rust is a hideous looking language, despite its many other benefits.

Re:Carbon Language: An experimental successor to C++ by Someone on Tuesday July 19, 2022 @12:10PM (#32153789)
If Rusty syntax is objectively superior to almost everything else we've come up with, that almost should make us think before blindly copying it.

So, for those thinking “Rusty syntax is objectively superior to almost everything else we've come up with” (I don’t, if only because I don’t believe the syntax of programming languages can be compared on quality without considering the audience), what syntax do you believe it not objectively superior to?

Re:Carbon Language: An experimental successor to C++ by Joker_vD on Tuesday July 19, 2022 @12:09PM (#32153779)
> is objectively superior

Those objective criteria of superiority being?..

Re:Carbon Language: An experimental successor to C++ by vazgriz on Tuesday July 19, 2022 @12:29PM (#32154130)
It eliminates the Most Vexing Parse.

Consider this C++ code:

  Foo bar();
A programmer could make simple mistake thinking that is declaring a variable of type Foo. Carbon eliminates this by having explicit keywords for variable and function declaration. (This style is much more Rust based than C++)

  fn bar() -> Foo;
  var bar : Foo;
It makes parsing easier for both the users and maintainers of the language.
Re:Carbon Language: An experimental successor to C++ by compiler-guy on Tuesday July 19, 2022 @12:37PM (#32154252)
There are literally thousands of shipping languages that don't have the most vexing parse problem.

If that is Rust's entire syntax advantage, it isn't a very big one.

Re:Carbon Language: An experimental successor to C++ by arinlen on Tuesday July 19, 2022 @02:22PM (#32155876)
> It eliminates the Most Vexing Parse.

C++'s most vexing parse issue ceased to be a concern around a decade ago with the introduction of uniform initialization.

Re:Carbon Language: An experimental successor to C++ by Joker_vD on Tuesday July 19, 2022 @12:35PM (#32154222)
If that's the only criterion then Pascal's syntax, which doesn't have "the most vexing parse" problem either, and for the same reason, is also almost better than anything else.
Re:Carbon Language: An experimental successor to C++ by xigoi on Tuesday July 19, 2022 @03:05PM (#32156410)
So by this logic, pretty much every language other than C++ has “objectively best” syntax.
Re:Carbon Language: An experimental successor to C++ by zamalek on Tuesday July 19, 2022 @06:43PM (#32158945)
long long

Templates