News for hackers. Stuff that matters.
Re:Rust: A Critical Retrospective by scns on Friday May 20, 2022 @02:22AM (#31443982)
That would be confusing, because T? means Option<T> in other languages (Kotlin, Typescript).
Re:Rust: A Critical Retrospective by dllthomas on Saturday May 21, 2022 @03:57PM (#31461233)
That's a good point, but I am not sure it would actually be a problem.

For one thing, we already have syntactic collisions that don't seem to cause much problem (consider `foo?.bar` in .ts vs .rs), and this one would probably be prevalent enough that it would quickly be familiar to anyone using the language.

For another, if we squint I'm not sure those other languages aren't "really" using it for the same thing. If in some module we define `type Result<T> = Option<T>` then we have the same behavior in Rust, and we can imagine that those other languages have basically done so implicitly, meaning it's a less flexible version of the same mechanism (put to slightly different purposes).