Hacker News new | past | comments | ask | show | jobs | submit login

Except that's not where it ends. The Bastion is only a demonstration that it takes a breaking change to get rid of the turbofish. But every new keyword is also a breaking change, and in practice new keywords cause more breakage than the proposed approach for getting rid of the turbofish. Rust editions can easily handle that.

Ordering the events on @varkor's attempts to eliminate the turbofish:

* RFC 2527

* Bastion of the Turbofish

* RFC 2544

If you'd like to know why Rust really still has a turbofish, the huge RFC 2544 thread has the full story: https://github.com/rust-lang/rfcs/pull/2544

Important points in that discussion (I'm only linking to the comments summarizing other comments):

* Sep 2018: Lang team rejects the change for 2018 edition due to lack of time: https://github.com/rust-lang/rfcs/pull/2544#issuecomment-423...

* Jan 2019: Lang team proposes to merge the RFC (accept the change): https://github.com/rust-lang/rfcs/pull/2544#issuecomment-453...

* A bunch of people objected, people can't agree on subjective points: https://github.com/rust-lang/rfcs/pull/2544#issuecomment-453...

* The discussion got derailed and closed as too heated: https://github.com/rust-lang/rfcs/pull/2544#issuecomment-453...

And that's where the project to eliminate the turbofish died. Nobody in the know wants to deal with that much drama, so AFAIK no one has tried again.




How is a new keyword a *major* breaking change? They can only be introduced at edition boundaries, which means they are opt in. And code can be automatically upgraded to a newer edition by replacing uses of `keyword` with `r#keyword`.

New keywords are a relatively minor inconvenience so long as there aren't too many.


I didn't say a new keyword is major breaking change.

New keywords are small breaking changes; I'm saying that the breakage when eliminating the turbofish is even smaller!

If you read RFC 2544, some team members were considering removing the turbofish without a new edition, because a crater run did not find any real-world code that would break. The "Bastion of the Turbofish" might literally be the only Rust code in existence that would be broken.




Consider applying for YC's first-ever Fall batch! Applications are open till Aug 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: