Live data from Hacker News

Carbon Language: An experimental successor to C++

github.com

1–10 of 521 posts

Re: Carbon Language: An experimental successor to C++

#3
I was interested and intrigued, but then:

     // A dynamically sized array, like `std::vector`.
     var circles: Array(Circle) = ({.r = 1.0}, {.r = 2.0});
Yegads, they've put effort into ensuring API and ABI compatibility with C++, but they've gone and decided to change the meaning of nouns for basic types?!

Why, just why would introducing that obvious footgun be appealing? It raises the concern that the language is full of other arbitrary choices hiding dangerous footguns.

Edit:

Strangely, their test suite makes it look like Array is bounds checked and fixed size; there is no test for resizing:

https://github.com/carbon-language/carbon-lang/tree/trunk/ex...

Re: Carbon Language: An experimental successor to C++

#5
post #3

I was interested and intrigued, but then: // A dynamically sized array, like `std::vector`. var circles: Array(Circle) = ({.r = 1.0}, {.r = 2.0}); Yegads, they've put effort into ensuring API and ABI compatibility with C++, but they've gone and decided to change the meaning of nouns for basic types?! Why, just why would introducing that obvious footgun be appealing? It raises the concern that the language is full of…

Why is it an obvious footgun?

Re: Carbon Language: An experimental successor to C++

#6
Based on my quick read, “Why build Carbon?” section calls out just 1 problem with C++ which is the developer experience. Agreed.

However Carbon seems to do a whole lot more than DevEx. It’s practically a whole new language that can interop with C++. I don’t see the point in that. Would be great if someone pointed out why I should change my mind.

Re: Carbon Language: An experimental successor to C++

#7
post #3

I was interested and intrigued, but then: // A dynamically sized array, like `std::vector`. var circles: Array(Circle) = ({.r = 1.0}, {.r = 2.0}); Yegads, they've put effort into ensuring API and ABI compatibility with C++, but they've gone and decided to change the meaning of nouns for basic types?! Why, just why would introducing that obvious footgun be appealing? It raises the concern that the language is full of…

It's std::vector that was weirdly named. In plenty of codebases "Vector", particularly gamedev and scientific, will mean the mathematical object with that name.

Other languages don't need to replicate this mistake.

Re: Carbon Language: An experimental successor to C++

#8

Based on my quick read, “Why build Carbon?” section calls out just 1 problem with C++ which is the developer experience. Agreed. However Carbon seems to do a whole lot more than DevEx. It’s practically a whole new language that can interop with C++. I don’t see the point in that. Would be great if someone pointed out why I should change my mind.

They have a separate document about difficulties improving C++: https://github.com/carbon-language/carbon-lang/blob/trunk/do...

Re: Carbon Language: An experimental successor to C++

#10
post #7
post #3

I was interested and intrigued, but then: // A dynamically sized array, like `std::vector`. var circles: Array(Circle) = ({.r = 1.0}, {.r = 2.0}); Yegads, they've put effort into ensuring API and ABI compatibility with C++, but they've gone and decided to change the meaning of nouns for basic types?! Why, just why would introducing that obvious footgun be appealing? It raises the concern that the language is full of…

It's std::vector that was weirdly named. In plenty of codebases "Vector", particularly gamedev and scientific, will mean the mathematical object with that name. Other languages don't need to replicate this mistake.

And yet it is the name used in C++ code for a variable length container of contiguously stored data.
Post reply on HN