Problems? Is your data what you think it is? | |
PerlMonks |
Re^3: howto map/grep a complex structureby AnomalousMonk (Archbishop) |
on Aug 27, 2015 at 14:03 UTC ( [id://1140208]=note: print w/replies, xml ) | Need Help?? |
I can't say I agree with the overall approach of trippledubs here, but I think the use of prototypes therein can be said to have a constructive and well understood purpose.
As written, collectLeaves() is recursive, and within the function the calls such as
Outside the function, prototyping allows calls like (But S([],[42]) will not compile.) Again, I don't say I necessarily agree with the approach, but I cannot agree that prototyping has been sprinkled thoughtlessly onto the code as a kind of magical correctness dust, as we have often seen. OTOH, I agree with you that the response of future maintainers to this code (or recursive functions in general) is a valid concern. Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|