in reply to Re^4: Hash/Array slice : how to exclude items?
in thread Hash/Array slice : how to exclude items?
yes, that's one of my fetishes. But as you and hv said: do the printing in the block. It sounds a bit excessive but it seems a good candidate now, along with the slice-with-grep-keys. Given that I may use a number of "printers" : print, say, Dumper, Mojo::Log, then I would not want a special sub which hardcodes the logger.
One purpose of this post was to nudge Perl language developers to consider exclude-slices, with maximum elegance and minimum overhead (Logging like this happens every few lines of code for me). Btw, the negation with ! looks nice.
Btw2, is anyone aware of another language implementing this? I googled pithon and did not see something.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Hash/Array slice : how to exclude items?
by LanX (Saint) on Jan 25, 2023 at 14:26 UTC |