algebaric operations on a RegEx?

Alex Beamish talexb-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Mon Apr 6 19:02:47 UTC 2009


On Mon, Apr 6, 2009 at 1:58 PM, Lennart Sorensen
<lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org> wrote:
> On Mon, Apr 06, 2009 at 12:41:39PM -0400, Madison Kelly wrote:
>> "hate perl"? Oh, IT'S ON!
>>
>> :D
>>
>> Perl's a language you love or you hate. It doesn't seem to have much
>> middle ground. I, personally, love it for it's flexibility. Though I
>> have to admit, it can get pretty cryptic in the hands of someone for
>> whom that is their intention. It enforces no "good behaviour", but
>> instead leaves it to the coder to give a damn or not.
>
> Well the more I use perl the more I start to dislike it.  The syntax
> is just awful.  Too inconsistant, too many ways to do the same thing.
> Too much magic that makes things that you don't want be legal syntax
> yet do nothing useful.  I still use perl, because well I know it.
> I do try to avoid all the nifty features that makes perl hard to read.
> Many nice languages grow on you with use.  Perl does the opposit after
> a while.

:) To each his/her own, I guess.

> Things I dislike are:
> push(@myarray,\%foo) [why do I need to do that?]

Because you want to add a reference to the foo hash to the end of myarray?

> and then reletated to that:
> $foo{'bar'} versus $foo->{'bar'}.  Why does one work and the other not
> in this case?

The former address the bar element in the foo hash. The latter does
the same with the foo hashref.

And another way of writing the former is ${myarray[-1]}{'bar'} .. but
this is just as complicated as using an array of structures that
contain functions pointers in C; not something that gets daily use,
perhaps, but a very useful part of the language.

> Does perl have pointers and if so when?  Gah!

Perl has references, which provide the same indirection that pointers
do in C. it's tough to do advanced software development without
pointers, IMHO.

> Python is at least more consistant in syntax, although that too is a
> language suffering from evolution (too many features have been deprecated
> over time making old example code no longer valid syntax).
>
> php is quite nice.  I haven't used it for command line scripts, although
> it is perfectly possible.

PHP is a nice beginner's language, but it's not much use to me beyond
doing web pages, so I haven't used it much.

Perl gets the job done nicely for me -- and I quite like the community support.

-- 
Alex Beamish
Toronto, Ontario
aka talexb
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list