From: Rob Pike <robpike@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Sam commands in acme
Date: Sat, 27 Jun 2009 12:20:06 -0700 [thread overview]
Message-ID: <7359f0490906271220q4773f616k7d1a6ec79a3a30bc@mail.gmail.com> (raw)
In-Reply-To: <3aaafc130906271117h333de206xd746efe8474e6f35@mail.gmail.com>
On Sat, Jun 27, 2009 at 11:17 AM, J.R. Mauro<jrm8005@gmail.com> wrote:
> On Fri, Jun 26, 2009 at 6:57 AM, roger peppe<rogpeppe@gmail.com> wrote:
>> you need (.|\n) instead of .
>>
>> sam originally used @ as a "match everything" character
>> but it was removed, presumably because it was rarely used.
>
> That's a stupid reason to remove a good feature. By that token, maybe
> we should remove structural regular expressions since they're "rarely
> used" and just go back to using ed.
Indeed, but it's an excellent reason to remove a bad feature. @ was a
bad feature. It was hard to use well because @* or @+ would consume
the whole file. Plus it was barely a feature, just a convenience
entirely equivalent to (.|\n), which, by the way, you almost never
see.
It went in when we didn't yet know how the all-one-string model of sam
would turn out. It turned out just fine and didn't need the @
feature, so out it went. After several years went by without my using
it once, while @ simultaneously became useful as a real character so
annoying as a metacharacter, out it went.
Deletion is the greatest tool of software design.
-rob
next prev parent reply other threads:[~2009-06-27 19:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-26 9:50 hugo rivera
2009-06-26 10:42 ` yy
2009-06-26 11:54 ` hugo rivera
2009-06-26 12:05 ` Rudolf Sykora
2009-06-26 12:21 ` hugo rivera
2009-06-26 10:57 ` roger peppe
2009-06-27 18:17 ` J.R. Mauro
2009-06-27 19:20 ` Rob Pike [this message]
2009-06-27 20:32 ` J.R. Mauro
2009-06-29 17:03 ` roger peppe
2009-06-29 17:20 ` erik quanstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7359f0490906271220q4773f616k7d1a6ec79a3a30bc@mail.gmail.com \
--to=robpike@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).