News for hackers. Stuff that matters.
Re:Rust concepts I wish I learned earlier by ElderKorihor on Wednesday January 18, 2023 @05:19PM (#34433939)
> Use impl types as arguments rather than generic constraints when you can

Eep. No. At least, not in anything public. Universal impl trait arguments can't be turbofished, so you're placing an unnecessary constraint on your caller.

Re:Rust concepts I wish I learned earlier by orf on Wednesday January 18, 2023 @09:16PM (#34435944)
As I understand it &impl Meower also uses dynamic dispatch, whereas the generic version will generate a specialized version for each concrete type it is called with.
Re:Rust concepts I wish I learned earlier by charrondev on Thursday January 19, 2023 @02:02PM (#34444144)
Are you sure? I thought that was dyn Meower.
Re:Rust concepts I wish I learned earlier by orf on Thursday January 19, 2023 @02:13PM (#34444309)
You’re right! My bad
Re:Rust concepts I wish I learned earlier by avinassh on Thursday January 19, 2023 @12:42AM (#34437101)
> Universal impl trait arguments can't be turbofished, so you're placing an unnecessary constraint on your caller.

What does this mean?