4 ms·
Can you elaborate a little bit why it would be important? I get the appeal, of course, but having spent lots of time in Rust the past few years, it feels like p
by cfcosta 5y ago
Can you elaborate a little bit why it would be important? I get the appeal, of course, but having spent lots of time in Rust the past few years, it feels like polymorphism/traits cover that hole quite well, and will get better once/if GATs get fully implemented (different implementations for different enum variants).
Maybe I'm too biased by the current state, how do you think optional arguments would make it better?
- flerovium 5y agoNamed parameters came from Smalltalk, and no explanation I give can equal the sheet beauty of reading smalltalk code. I'm not sure I could devise a full explanation, but a concise example is in scientific libraries for functions like, `run_simulation(data, optimizer = "Lebesque", shearing_algorithm = "Neue", spline_intensity = "Forrester")`. The number of options can be very large.
- cfcosta 5y agoOh, smalltalk is neat, indeed, but would need both optional and named arguments at the same time to get the same effect, right? Would still make sense to you to get one without the other? I think optional is much more possible than named :P