Is Destructured unable to handle default arguments or am I misunderstanding its purpose?
#236
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi, thanks for the question! To make this work today, you would do but ultimately yes, i think there is a bug here because I guess the question is whether it makes sense to directly infer that in absence of a predefined default...I think likely yes. I was initially going to say lacking the above default essentially makes it programmer error, since you didn't declare a default, how are we supposed to know what to do? But it seems like a pretty safe default to me. if the class doesn't allow zero-argument construction by way of a required arg, then it would automatically produce a user error for the missing argument. |
Beta Was this translation helpful? Give feedback.

#237 Implements that as default behavior, and additionally implements
Other | NoneimplyingNone