On 21/03/08 08:43 +0000, Matthew Winn wrote:
>
>> Also, regexps in vim look hard to read, because of the many escapes
>> that have to be used by default. Maybe we should consider enabling the
>> "very magic" in the global configuration file, when vim gets
>> installed ? This would make  vim regexps friendlier for newbies :-)
>
>The point of Vim's (vi's) regular expressions is to make them quicker
>to type interactively, which is how most regular expressions are used.
>For example, you're more likely to want to search for a literal ( than
>to want grouping, so by default ( is a literal character and \( is a
>metacharacter. On the other hand * rarely occurs in text, so * is a
>metacharacter and \* is a literal asterisk. The idea is that in the
>most common situations the bare character does what you want and the
>backslashed character has the less common meaning. Speed of typing
>takes precedence over consistency.
>
>Contrast this with Perl, where regular expressions are built into the
>language. There you write regular expressions once and then refer back
>to them every time you edit the code, so consistency of syntax is more
>important than speed of typing. In Perl a bare character is literal
>if it's a letter or digit and special if it's punctuation, while a
>backslashed character is special if it's a letter or digit and literal
>if it's punctuation. That works well for Perl, but a strategy that
>makes sense for a programming language doesn't necessarily make sense
>for an editor.
>

That point is arguable. IIRC, elvis uses perl kind regex. 
What about grep, sed, awk, python..., they all use so-called similar
regexes, but each of them have their own reasons for supporting their
specifics.
So, I think the point is,  at the beginning of a project, most FREE
developers often tend to be a little 'selfish' when they are writing
softwares to solve their own problem rather than consider others how to
use it. As the development continues, the project cannot reject the
burden of his own history for some compatibility reasons. 

-- 
Dasn


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui