But strive to do it naturally, and you won't likely find the proposed method useful in many situations.
I am not psychic here, what does 'more naturally' mean to you? Please elaborate and we can debate opinions on an equal front, but one saying 'what you do is not natural' is a assault on code without backing -- please explain your convictions and the merits of one style over another, and what is 'more or less natural' to you. You may find there are many of those who disagree, and as it stands, we don't even know what you mean. It's sort of like me saying "I am flyingmoose and your code is wrong because I am flyingmoose". That doesn't help folks, really it doesn't, and perhaps you need to look more carefully about what you are saying when you say it.
Also, 'the proposed method' ... mine? Or Limbic~Regions. As I have been maintaining many times, I don't like Limbic's proposed method. I'm talking foreach, grep, and map! Seriously... are you arguing against foreach, grep, and map? Because it appears you have me confused with Limbic (as does dragonchild). Personally I think a simple use of non-combined map's or grep's is very natural, very readable, and obvious. I don't like dragonchild's particular re-coding of my Star Trek example -- I find that very unnatural, inflexible, and quite the maintaince problem.
| [reply] |
Well since "naturally" is an aesthetic judgement, it is hard to provide a precise definition. Rather you can provide contrasting examples and get a sense of someone else's tastes.
But the reason for my comment is that Perl has enough ways to distribute actions over lists in a concise manner (map, foreach, etc, etc) that introducing a very specialized one doesn't meet the utility threshold to be worthwhile.
But if you disagree, try to produce an example where such a method would make sense, and I'll produce an example that doesn't use the method, and we can compare. If it really is natural for your problem domain, then it shouldn't be hard to come up with a good example...
| [reply] |
| [reply] |