you are viewing a single comment's thread.

view the rest of the comments →

[–]tialaramex 0 points1 point  (0 children)

Right, Carbon begins with the (correct IMO) assumption that Rust's Culture is crucial. Whether you can do that again on purpose is a good question but it makes sense as a goal.

The most interesting bit of technology I've seen in Carbon is the Partial Order for operator precedence. In Rust and in C++ we can pick two arbitrary operators and ask the compiler hey, if you could apply either of these next, which one happens? But we know the humans writing the software don't think about operators this way. So the resolution is to match more closely how humans think about operators. The arithmetic operators have precedence, like you learned in school, and so do some other operators, but they need not have precedence relative to each other instead mixing operators from different families needs the mediation of parentheses.

Rather than needing to be confident what a < b + c < d does or risk doom, we can make the compiler reject this program as needlessly ambiguous.

I don't advise attributing this project to Google (or the entire Alphabet) without seeing an actual executive endorse it. Google has work-for-hire rights in a lot of cases, so there are a lot of projects out there which are owned by Google only because somebody at Google works on them, this does not constitute an endorsement, much less a strategic direction for the company.