3 ms·
> The problem with this article is that is doing something extremely simple, and calling that an abstraction. Simple examples make for good blog articles. Rea
by haberman 12y ago
> The problem with this article is that is doing something extremely simple, and calling that an abstraction.
Simple examples make for good blog articles. Real abstractions follow the same pattern as simple ones.
> The power of Python or Ruby is not demonstrated doing a for loop, is with something like this: print sum(int(n) for n in open('/a/file/with/numbers'))
In this case, your abstraction is sum(). Internally, sum() will use something like a for loop in its implementation. sum() is fast because it's implemented in C, not Python.