←back to thread

611 points LorenDB | 1 comments | | HN request time: 0s | source
Show context
jsat ◴[] No.43908667[source]
I see an article about how strict typing is better, but what would really be nice here is named parameters. I never want to go back to anonymous parameters.
replies(3): >>43908741 #>>43908994 #>>43909858 #
kelnos ◴[] No.43908741[source]
Yes, this is one of the few things that I think was a big mistake in Rust's language design. I used to do a lot of Scala, and really liked named parameters there.

I suppose it could still be added in the future; there are probably several syntax options that would be fully backward-compatible, without even needing a new Rust edition.

replies(1): >>43913577 #
1. quietbritishjim ◴[] No.43913577[source]
I suppose the sense it is backwards incompatible is that library authors have named their parameters without intended to make them part of the public interface that they commit to maintaining. Perhaps it could be made backwards compatible by being opt in function declarations but that would seem like a bit of a pain.