There's always a tension between creating generic data structure classes (Lists, Trees, Maps) and classes that are specific to the task at hand
I haven't used container classes much in PHP. With associative arrays on my fingertips, I haven't felt motivated. I recently did a stint of programming in Java, developing a client-side application with the Google Web Toolkit. GWT is an unorthodox Java environment: you write Java, but a special compiler translates the code to Javascript, which runs in an ordinary web browser. This lets you write AJAX applications in a style much like writing a desktop app. It might sound crazy, but it works pretty well. I like the Java containers alot, particularly the extra container classes from the Apache Commons. I particularly like there are multiple back-end implementations of the data structures so can choose structures that are appropriate for your particular workload. Java containers didn't work well with the type system in older versions of Java, but JDK 1.5 introduces generics, foreach and other syntactic sugar that makes them more fun to work with. Java developers rarely used hashes (associative arrays) when I was doing Java 5 years ago, but they're much more fashionable now -- they've been learning from the PHP (Perl, Python,...) world.
_______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
