On Sat, Jun 27, 2009 at 11:17 AM, J.R. Mauro<jrm8...@gmail.com> wrote:
> On Fri, Jun 26, 2009 at 6:57 AM, roger peppe<rogpe...@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

Reply via email to