This is Franklin Chen's Typepad Profile.
Join Typepad and start following Franklin Chen's activity
Franklin Chen
Recent Activity
Unfortunately, in this example, the code is quite inefficient. Each call to pad makes a copy of the original array. Even in the case where n is ary.length.
I'll write up more about what one could do instead with a language with lazy data structures and lazy evaluation, and whether that is even a good solution anyway.
Unconditional Programming
Control structures have been around nearly as long as programming but it's hard for me to see them as more than an annoyance. Over and over again, I find that better code has fewer if-statements, fewer switches, and fewer loops. Often this happens because developers are using languages with be...
Franklin Chen is now following The Typepad Team
Jan 10, 2012
Subscribe to Franklin Chen’s Recent Activity