[fpc-pascal] My favourite missing feature

ik idokan at gmail.com
Wed Dec 24 12:34:09 CET 2008


On Wed, Dec 24, 2008 at 12:56 PM, Jürgen Hestermann <
juergen.hestermann at gmx.de> wrote:

> To use grep, sed, awk, or a text editor effectively, one must
>> understand regular expressions.
> Maybe. I never used them (except a text editor of course). Everything you
> can do with these tools is also possible with a good Pascal compiler (and
> much more). So why waste time on learning another language that is only a
> subset of the language you already know?

First of all it's a another tool, and if you are using it correctly, it is
faster and more efficient then using pos, copy and looping across each char
on your own, because the code is very optimized and reduce your work when
parsing for patterns. It is bad practice when you use it for non pattern
usage, or when you know the exact location and length of each sub string you
wish to extract. Otherwise it only makes life more easier imho.

>  Anyone who doesn't, isn't a power user.
> Just the opposite. All the time you utilize on learning Regex could have
> been better invested in learning Pascal even better.
>  To refuse to learn regular expressions because they are cryptic
>> before you learn them is like refusing to learn English because
>> it is cryptic before you learn it.
> No. The metaphor for learnig Regex would be that you try to learn yet
> another foreign language (addtionally to English) so that you have less time
> learning English.

Amm, The metaphor should be learning a new rule in the English language to
use the English language better.

> Jürgen Hestermann.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20081224/08580f38/attachment.html>

More information about the fpc-pascal mailing list