Re:How to make your C codebase Rusty: rewriting keyboard fir...
by Rusky on Thursday November 21, 2019 @10:51PM
(#21602264)
That's true but antiparallel to my point:
C++ typename could have the same consistency as Rust's turbofish- its complicated rules are not necessitated by the lexer hack.
(In a sense, the complicated rules are what enable the lexer hack.)
Re:How to make your C codebase Rusty: rewriting keyboard fir...
by pjmlp on Friday November 22, 2019 @03:14AM
(#21603784)
C++20 has simplified the need for typename use cases.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p063...
Rust, by contrast, has no such limitation [2]:
This compiles and runs just fine with no need for a turbofish on T::A, because Rust has no lexer hack.[1]: https://en.cppreference.com/w/cpp/language/dependent_name
[2]: https://play.rust-lang.org/?version=stable&mode=debug&editio...