|go ahead... be a heretic|
Re^4: RFC: Destructuring Assignment (aka Unpacking aka Type Patterns) in pure Perlby LanX (Cardinal)
|on Jul 04, 2020 at 10:35 UTC||Need Help??|
Individual defaults are no problem.
set my $var= DEFAULT
does it already.
If there is no prior value, it will be undef because of my .
If you need a dedicated Missing different from undef I could return an error object.
Implementation is no problem, I'd need to think about the best API.
There might also be the case of reused variables - like in a loop - were you skipped the my, but don't want to default to the prior value but undef.
Again only a question of designing a intuitive API/Syntax and testing use cases.
°) my defaults to undef