From: Eleanor McHugh Date: 2010-11-30T22:26:04+09:00 Subject: Re: Ruby's "More than one way to do things." On 29 Nov 2010, at 04:40, Tim Roberts wrote: > Shadowfirebird wrote: >> >>> Ruby: "There is more than one way to do it." >>> Python: "There should be one - and preferably only one - obvious way to >>> do it." >> >> Programming languages -- at least, good programming languages -- shouldn't >> try to make programmers into better programmers, or force them to work in >> a certain way in order to get results. (Imagine a toolbox that told you >> off for using the wrong screwdriver!) > > I believe that's almost 100% wrong. A programming language that doesn't > try to make better programmers ends up enabling poor programming practices, > which ends up producing poor programs. That results in programs and web > sites that crash, which brings on a bad reputation for programmers in > general. > > PHP is a great example. It is possible to write good programs in PHP, but > it's also very, very easy to write bad programs in PHP. The result is that > most of the PHP samples you find on the web are absolute crap -- delicate, > unsafe, unmaintainable. The programmers don't realize this, and so the > crap reproduces like a virus. > > A toolbox certainly OUGHT to tell me off if I try to unscrew a slotted head > screw with a Philips screwdriver, if that saves me from taking a chunk out > of my hand as I do it. I wouldn't claim to be a good programmer, but I'm certainly a knowledgable one and that in large part because I've worked with languages which did their best not to get in my way. That has certainly resulted in some hideous abominations at various times but each of these has been deeply instructive and subsequent reflection has helped advance my knowledge and improve my instincts. Had I pursued the safer course and languages which insist on particular orthodoxies my coding life would have definitely been much poorer. Or to stick with your analogy: whilst it's true that a philips screwdriver happens to be a very good fit for a philips head screw, in the absence of that screwdriver it's better to know how to use another tool to achieve the same effect than to sit there worrying about how inappropriate your tools are. After all no toolbox can ever have every tool you might need, and the more tools contained in the toolbox the more knowledge is required before you can start using any of them competently. Ellie Eleanor McHugh Games With Brains twitter: @feyeleanor ---- raise ArgumentError unless @reality.responds_to? :reason