From owner-cvs-all Tue May 7 17:25:31 2002 Delivered-To: cvs-all@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id B657337B407; Tue, 7 May 2002 17:25:22 -0700 (PDT) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g480PLob543120; Tue, 7 May 2002 20:25:21 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20020507233024.GC20078@FreeBSD.ORG> References: <20020507184519.GB28857@FreeBSD.ORG> <20020507191959.GA26441@FreeBSD.ORG> <20020507232301.GB45271@electricjellyfish.net> <20020507233024.GC20078@FreeBSD.ORG> Date: Tue, 7 May 2002 20:25:19 -0400 To: "J. Mallett" From: Garance A Drosihn Subject: Re: cvs commit: src/usr.bin/sed main.c sed.1 Cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 11:30 PM +0000 5/7/02, J. Mallett wrote: >I'd go so far as to say we're implementing a superset of Perl's >capabilities in sed(1), and as such, the "old code" provision >falls in. After all, if you re-implmeneted a whole utility, you >would want compatability. All we want is front-end compatability >with Perl. The options. If a user can not be bothered to use '-I .blah' instead of '-i.blah', then they can continue to use perl for all I care. We do need to be compatible with other versions of sed, but not with completely different commands. A user will only use the new -i or -I if they read the man page for sed, and if they do that then they don't need the optional-argument on -i (because they will know they can use -I). Or to state my feeling in a different way, you would support optional arguments like -i.blah only if it would break a script to not support it. There is no script which literally has 'sed -i.blah' right now, because the scripts are all using perl to do in-place editing. At the same time a user changes 'perl' to 'sed', they can change '-i.blah' to '-I .blah'. >Maybe there's a flaw in that logic. > >Maybe there's a flaw in conforming to a standard and breaking >POLA, where said standard has not been broken in existing >functionalities, just new ones, that furthermore, are covered >in and of themselves, directly or otherwise, by provisions >in said standard. I need more caffeine before I can parse that sentence... :-) In any case, over the years the standards have been less and less favorable to these optional arguments, because optional arguments are often a hassle precisely because they do not behave consistently. I gain much more (as a user) if I can use -i and know that it *never* will eat up the rest of the line, than I gain from being able to type -i.bak instead of '-I .bak'. I should note that don't feel too strongly about it, but I do really think it is better if we do not introduce any new options which take optional-arguments. It isn't just that I think it's a good idea to follow standards, but I think this is a case where the standards have the "right" (more user- friendly) idea. All of this is just my opinion, of course. Mainly I'm just happy to have this ability in sed, however the options work out. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message