From owner-freebsd-questions@FreeBSD.ORG Tue Apr 6 18:43:08 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEFFA1065670 for ; Tue, 6 Apr 2010 18:43:08 +0000 (UTC) (envelope-from merlyn@stonehenge.com) Received: from red.stonehenge.com (red.stonehenge.com [208.79.95.2]) by mx1.freebsd.org (Postfix) with ESMTP id C3B9E8FC12 for ; Tue, 6 Apr 2010 18:43:08 +0000 (UTC) Received: by red.stonehenge.com (Postfix, from userid 1001) id 77B467AEA; Tue, 6 Apr 2010 11:43:08 -0700 (PDT) From: merlyn@stonehenge.com (Randal L. Schwartz) To: Chuck Swiger References: <4BB8108A.9080104@FreeBSD.org> <1270371713.5861.98.camel@tao.thought.org> <86aatjnsts.fsf@red.stonehenge.com> <861vevnsow.fsf@red.stonehenge.com> <20100404163353.GA15198@guilt.hydra> <20100404201442.b456044e.freebsd@edvax.de> <4BB9A5ED.3040309@infracaninophile.co.uk> <20100405173632.739a0c42@gumby.homeunix.com> <20100406015544.GA21119@guilt.hydra> <20100406132049.641b9edf@gumby.homeunix.com> <86wrwkiunp.fsf@red.stonehenge.com> <2EE33758-C39C-41DC-B6A8-B34CF6B3B25A@mac.com> <86k4sk1mle.fsf@red.stonehenge.com> <66F97B7C-9D27-452B-BCC8-30C960599AE0@mac.com> x-mayan-date: Long count = 12.19.17.4.10; tzolkin = 2 Oc; haab = 3 Pop Date: Tue, 06 Apr 2010 11:43:08 -0700 In-Reply-To: <66F97B7C-9D27-452B-BCC8-30C960599AE0@mac.com> (Chuck Swiger's message of "Tue, 06 Apr 2010 11:36:12 -0700") Message-ID: <86d3yc2zib.fsf@red.stonehenge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: FreeBSD - Subject: Re: perl qstn... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 18:43:09 -0000 >>>>> "Chuck" == Chuck Swiger writes: >> >> Then you wouldn't have used this construct. Chuck> If the construct isn't a good idea considering the most obvious Chuck> change one might make to the code, Objection: presumes facts not in evidence, your honor. Seriously, I've written thousands of lines that look like: print "....." if $flag; over the years (decades), and only *once* or *twice* do I ever recall saying "oh, I actually wanted a two-way switch", and had to rewrite it. So "most obvious" to you is clearly not what is actually most likely. This undermines the rest of your argument, but let's read on... Chuck> Surely Perl source code shouldn't be considered as write-once, Chuck> modify-never? Yes, and that's also presumes facts not in evidence. See above. Chuck> I would suggest that good software not only allows the user the Chuck> full freedom to do anything which is possible, it should also Chuck> avoid asking the user about choices which are Chuck> impossible/invalid/wrong/etc. This can be input field Chuck> validation, middleware logic, this can be determining the present Chuck> state and greying out options which are not currently applicable, Chuck> etc. I agree. The difference with Perl is that there are often many equally good ways to choose. If that's too much repsonsibility for you, please don't use Perl. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion