Hacker News new | ask | show | jobs
by dnsco 1477 days ago
The turbofish resolves a bunch of syntax ambiguities[1].

Apparently C++ parsing is undecidable, so building an AST requires arbitrary template instantiation (and C++ templates are turing complete).

The turbofish is a compromise that allows the parser to stay simple. I know there were efforts to remove it, but it appears to be here to stay.

https://github.com/rust-lang/rust/blob/master/src/test/ui/pa...