Next | "Design Patterns" Aren't | 5 |
In C++ it is, because C++ sucks (ditto Java)
But in a better language, it's not a problem at all
For example, Perl provides a universal solution:
foreach $element (@collection) { ... }
This fails in C++ because the type system is too weak
Solutions with higher-order functions fail too
No anonymous functions or lexical closure
Ditto Java
Next | Copyright © 2002 M. J. Dominus |