in reply to I wrote some clever code - can the comment "defuse" it?
I think that your rewritten version is clearer, but I feel the problem in the original is the splice. I have developed a well earned loathing of tinkering with arrays like that. I prefer to map or push elements and work on them methodically.
I think you could do it a little more lisp like with multiple maps taking the place of the join and regexp, but that's personal style, and that would require a temporary variable outside the scope of the map block. But temporary variables aren't always bad.
____________________
Jeremy
I didn't believe in evil until I dated it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: I wrote some clever code - can the comment "defuse" it?
by Aristotle (Chancellor) on Jun 18, 2003 at 10:02 UTC |