Post #3031625
2026-06-01 21:15 UTC
@zwarich@hachyderm.io there’s always the classic ::Constructor
Replies (1)
-
@zwarich@hachyderm.io 2026-06-01 21:57
@joe@f.duriansoftware.com I also thought of that, but if you have two separate projection operators in your language (which is an acceptable choice) then `::` would probably have the same problem as `.`. I guess you could do it without having `::` as a "static" projection operator, but it would be a bit weird. I think Rust is still debating whether to support `_::Constructor(...)`, along with companion `_ { ... }` instead of `Struct { ... }`. I don't think they could make `::Constructor(...)` work because of the extern prelude. I think I also saw someone who wanted Zig's `.{ ... }` for structs.