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.

3 points•bluepeter•10 days ago•2 comments•

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