Comment

Comment by dleslie

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...

parent dleslie 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton