From: Chad Perrin Date: 2006-08-09T02:45:48+09:00 Subject: Re: Language chatter On Wed, Aug 09, 2006 at 12:53:49AM +0900, M. Edward (Ed) Borasky wrote: > > But of course, the Rails folks rediscovered all of this -- the power > that comes from restricting some freedoms. Maybe the Python motto -- > "There's only one way to do it" is the right thing after all. It's not restriction that does this for you -- it's well-designed default abstractions. With some languages and for some tasks, those defaults must exist in your head, and with others they exist in the toolset (the language interpreter, the framework, et cetera). In either case, they need not be restrictions, per se. Restrictions are inviolable defaults, and Python's inviolable defaults are reasonably well-designed, but they're still limiting when one must do something that is best accomplished in a manner incompatible with those defaults. Perl has a "horn of plenty" approach to defaults, where you pick and choose your default behavior set from an incredibly large menu of discrete defaults to suit your personal taste and your problem domain. This has its ups and downs: on the upside, you have more flexibility when you must accomplish something not covered by the vision of the guys that created the language's defaults and, on the downside, you have a language so complex that you're almost guaranteed to end up using a suboptimal set of chosen default abstractions for your task because you don't know the entire language (Larry Wall has, himself, said he doesn't know all of Perl). Lisp, in my understanding, achieves greater flexibility than Perl by making it absurdly easy to arbitrarily generate the defaults that best suit the task at hand. Ruby, meanwhile, is a great compromise between all three of those approaches: there are default abstractions that are clearly defined, and it encourages the programmer to use them for solving problems, but it makes it possible to use a plethora of other abstractions that are nondefault and still available to the programmer. When that's not enough, it provides macros for building your own defaults from "scratch" with notable ease. Obviously, this is all oversimplified, and I'm hampered by varying levels of familiarity with the various languages discussed when I explain my take on them, but I'm pretty sure nobody knows everything about all these languages so I'll just chalk it up to "the human condition". -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] "The measure on a man's real character is what he would do if he knew he would never be found out." - Thomas McCauley