Closed as not planned
Description
In Rust (which vine takes significant syntax inspiration from), the token :
is used for two things:
- Giving types to things
- Initialization of structs
With 10+ years of hindsight, I think we can pretty definitively conclude this is a mistake.
The biggest problem is how this interferes with the type ascription,
so much so that type ascription as a feature was scrapped.
Another point of reference is Carbon, a language that also takes a lot of syntax inspiration from Rust, does not use :
in struct literals.
This allows it to have more natural type ascription, which is especially noticeable for things like tuples.
Rust: let (x, y): (u8, u32) = (1, 2)
Carbon: let (x: u8, y: u32) = (1, 2)
Metadata
Metadata
Assignees
Labels
No labels