Toot

Written by Per Vognsen on 2025-01-03 at 01:29

Unfortunately even Rust can violate parametricity due to the (very limited) use of specialization in the standard library implementation to optimize certain cases. It would be nice if specialization was only allowed when you have an Any-like bound on the type parameter, which should retain parametricity. The downside is that you can't add specialization after the fact without changing the API. You could maybe salvage that by making it a default bound with an opt-out like Sized vs ?Sized.

=> More informations about this toot | View the thread | More toots from pervognsen@mastodon.social

Mentions

Tags

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113761828598051389
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
222.595718 milliseconds
Gemini-to-HTML Time
0.264651 milliseconds

This content has been proxied by September (3851b).