logoalt Hacker News

darksaints07/31/20252 repliesview on HN

I remember back when Rust was still in so much flux that there were regular discussions about syntax, and there was a proposal very similar to the syntax of carbon: square brackets for generics and type annotations, parens for indexing, etc. It was basically turned down because they wanted to win over C++ devs. I still wish it was the favored outcome...it looks so much cleaner and less jarring.


Replies

kibwen07/31/2025

Nah, IMO they're both pretty suboptimal, and if Rust is going to choose between two bad options, it might as well choose the overwhelmingly familiar option. (Sadly, my strong opinions on what type parameter and indexing syntax should look like are too large for this margin to contain.)

gpderetta07/31/2025

The joke is that no* c++ dev actually likes the bracket syntax for templates.

* I might be slightly exaggerating.