Martin DeMello wrote:
To me, one major component of 'fun' is how well the 'grain' of the
language supports clean, abstract programming and problem solving in
the domain at hand. Ruby is a lot of fun, for example, because its
blocks make control structure abstraction not only easy, but the
*natural* way to solve a problem, because it speaks unix very well
indeed, and because it is sufficiently multiparadigm that you almost
never need to fight the language to do what you want to do.
Yes, as long as your problem can be naturally expressed as a mapping from real-world entities to objects and classes, Ruby is the natural way to do it. I have a problem, however, that's most naturally coded as vector and matrix operations. Moreover, the algorithm is already defined, and although there are real world "classes" of "objects" -- workload classes and service centers in a queuing network, as a matter of fact -- there's no "obvious" way to say the methods "belong" to a workload class or a service center, because most of them are a double loop over both workload classes and service centers. As a result, the whole idea of doing it in Ruby is losing its appeal, and I'm probably going to give up and write the whole thing in R.
Lisp and Haskell are both almost as much fun as ruby, but a major win
for the latter is that it is the first (sufficiently powerful)
language where I've never had to wonder whether I'm using the language
wrong or simply approaching the problem wrong (I've had experiences in
both CL and Haskell where I was actually making a mistake in my
formulation of the problem, but my first instinct was nevertheless to
blame my grasp of the language. Doubtless that will go away as I get
more comfortable in said languages, but with ruby I was comfortable
from day one).
Lisp, at least the dialect I learned many years ago and still think in, is a very low-level language compared to Ruby. It is elegant and simple and clean and powerful and all that, but there really are only two data structures -- the dotted pair and the list. The impressions I've gotten of Haskell -- pretty sparse, except that I've read the works on Combinatory Logic by the man the language was named after, Haskell Curry -- is that if you think in combinators, it's great.
But I don't ... and I don't really think in lambda calculus or objects and classes either. I think in applied math, both numeric and symbolic, and in macro assembler and Boolean logic design. That's one reason I like Petri nets so much -- you can reduce them mechanically to matrix operations.
···
--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/
If God had meant for carrots to be eaten cooked, He would have given rabbits fire.