Hi Carl, Carl Youngblood wrote: > On Sun, 5 Sep 2004 07:26:25 +0900, Sascha Ebach <se / hexatex.de> wrote: > >>What is the main reason for using DI? Is it to produce the same >>functionality with less lines of code? Which is always excellent. In the > > > Are you sure? I can show you Lisp and Rebol code that accomplishes > more in orders-of-magnitude fewer lines than equivalent Ruby > implementations, but that does not necessarily mean that these > languages are easier to use, adapt, and understand. > > Many functional programming advocates could reasonably argue that > their favorite languages are considerably more powerful than Ruby, but > I think it comes down more to personal preference and how comfortable > a language is to use. Ruby makes more sense to me than most of the > highly functional languages out there, though I have often considered > taking the plunge into more frigid functional waters. I already > thought of myself as going out on a limb when I decided to code in a > relatively-less-popular language like ruby, and when I discovered > functional languages like OCaml my world was rocked even further. For > now I'm comfortable with Ruby though. By less lines of code I mean that the program is perfect when you can't take anything out of it anymore. By this I don't mean obfuscating the code or using only 1-2 letter variable names. Of course everything has to be readable and if you look at the YAML services Jamis uses you have to admit that they are very readable (compared to any programming language). I have no experience with functional programming so I can't talk about it, but if there is something like IoC for OCaml and I can make the same program with 3000 LoC instead of 10000 LoC I am sure going to look into it. My main motivation for using Ruby instead of Java is the compactness of expression. Java's redundancy produces so much LoC that I could simple not manage it. Despite the fact that there are excellent people in the community and there are also some excellent packages out there. I would love to be able to do work in Java, but this is just too much work for me. As I am usually working alone this is the most important consideration when developing. It is not the initial development of a program. But when i have to look into the program after 6-12 months it is a major thing if I have to look through 10000 instead of only 3000 LoC. The last time I looked into OCaml I didn't understand a single thing ;) Maybe I should try again. -- Sascha Ebach