please think about default parameters hat allow for easy calls.
fn (v mut x) dummy(path string, x1 int = 100, y1 int = 200) foo {...}
calls like:
x.dummy("foo")
x.dummy("foo", 500)
x.dummy("foo", 500, 1000)
This goes against the philosophy of V.
This goes against the philosophy of V.
Why ?
It could also be the occasion to have function kwargs:
dummy("path", y1:300)
After all, there is already this kind of struct initialiation in V:
s := MyStruct{ b: 6}
@Nicoco220983 @Delta456
Nicco - that correct. it is not question of personal feeling, but rather of usability.
@medvednikov
please think about it
@medvednikov have you got an opinion about that yet?
This has already been discussed here #453.
Bottomline: default parameters won't be allowed in functions but I believe there are plans to include them in structs. Don't know for sure.
@r-k-o default struct values have been implemented, so they can be used instead.
Most helpful comment
This goes against the philosophy of V.