[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On Sat, 23 Apr 2011, Kevin Lucas wrote:
I'm sure real programming isn't as messy as this but I will continue testing and tidying up who knows it might reduce to that elusive "one liner"
Why bother? Get it right, then make it faster - if needed. Real programming is full of this stuff.There's absolutely nothing wrong with iterating over one list of data to build another. Sometimes there is no one-liner that will do it for you. This is what programming is all about.
(And what do you think 'implode' is doing internally, anyway?)The "When in doubt, use brute force." quote is attributed to Ken Thompson - some 30+ year ago.
Read this: http://www.catb.org/~esr/writings/taoup/html/ Or maybe not - just pick a page at random. Gordon (Programmer) -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/listfaq