5 ms·
> Why does a parametrized enumerant look like a function call and not a struct? I don't think this is an "invented new syntax"; plenty of languages with built-
by saghm 8y ago
> Why does a parametrized enumerant look like a function call and not a struct?
I don't think this is an "invented new syntax"; plenty of languages with built-in support for sum types do it this way. Of course, most mainstream languages don't have built-in support for sum types, but that's an entirely unrelated point to Rust's syntax for them.