Toot

Written by lambdageek on 2024-11-27 at 21:01

Does any language without dependent types let you use _ as a placeholder for an inferred value when the context allows for only a single (canonical, in some sense) inhabitant?

for example if the expected type is Result<(),E> in rust, could the compiler infer that Ok(_) means Ok(())? Has anyone experimented with usability of something like that?

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

Mentions

Tags

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

This content has been proxied by September (ba2dc).