Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 May 2002 20:25:19 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        "J. Mallett" <jmallett@FreeBSD.ORG>
Cc:        cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.bin/sed main.c sed.1
Message-ID:  <p05111742b8fe1be2801c@[128.113.24.47]>
In-Reply-To: <20020507233024.GC20078@FreeBSD.ORG>
References:  <20020507184519.GB28857@FreeBSD.ORG> <XFMail.20020507150637.jhb@FreeBSD.org> <20020507191959.GA26441@FreeBSD.ORG> <p0511173fb8fe1074d26d@[128.113.24.47]> <20020507232301.GB45271@electricjellyfish.net> <20020507233024.GC20078@FreeBSD.ORG>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05111742b8fe1be2801c>