There’s a problem with Matlab. Even though it’s great for high-level programming, it just has too many functions, of which even the most seasoned developer is doomed to know only a small fraction. For example, the function pdist will return a matrix of pairwise distances, yet I’ve seen the same being done manually countless times.
Rather than cutting down the functionality provided by the language or forcing the user to “specialize” in studying certain Matlab functionality, I thought of an alternative approach:
The user knows what he wants to do. He wants to “compute the pairwise distance between observations in matrix A”. At this moment, his best bet is issuing the command “lookfor pairwise” and sifting through the results.
But wouldn’t it be nice if he could type “I want to compute the pairwise distance between observations in matrix A”, and, based on the documentation and some tagging of the functions, Matlab would automatically fill in “pdist(A)”?
This can apply to any language, of course. Java seems another good candidate, given the number of standard classes in J2SE.