Closed schwern closed 1 year ago
The first version of this feature actually did that. I scrapped it after performance testing: No matter what I did, I couldn't get it to run as fast as shoving everything into a hash first.
What kind of performance difference are we talking?
I don't see why this should be a documented feature. IMO it's going to be a mistake far more often than it's intended. The only time I can think this is a good idea is to override the defaults. Method::Signatures explicitly disallows it.
The same feature can be implemented by putting the options into a hash first. This has the advantage of being explicit. It's going to be pretty rare, so the extra code is ok.
The Perl idea that parameters are just a list (or list being flattened into a hash) is a weird language quirk. Function parameters should not hold over those quirks.