Whenever someone asks what my least favorite part of Rust is, my answer is always the same: it doesn't have named or optional arguments. This article explores the ideas for adding them, both good and bad.
2 comments
MiroslavPokorny10 days ago
I think optional arguments are a broken idea, because the optional value may be sensible or correct most of the time, but there will be a time when that good value suddenly becomes wrong. The effort to FIX this mistake now results in a lot more work that could have been saved if the optional was always required from the start.
andsoitis10 days ago
Notable that TypeScript has much worse ergonomics around named params than C# does. That of the latter is quite elegant.
Read the full thread on Hacker News →
Related stories
- Named and Optional Arguments Are Awesomebotahamec.devHacker News · 2 points · 7 days ago
- Named and Optional Arguments are Awesomebotahamec.devLobsters · 65 points · 9 days ago
- Hacker News · 1 points · 9 days ago
- We Have Named Arguments at Homecorrode.devLobsters · 53 points · 6 days ago
- Hacker News · 2 points · 10 days ago
- We Have Named Arguments at Homecorrode.devHacker News · 3 points · 6 days ago