If you are truly concerned with using what you understand
then I humbly submit that you should stop using regular
expressions. Why? Because I assure you that you have no
concept how it really works. (Did you know that it can
find fixed substrings *faster* than you can possibly scan
the original string?)
Besides which I can guarantee that your brain doesn't work
like Ilya's does. (Ilya is the guy responsible for most of
the RE engine.)
What? You are unconvinced? You tell me that regular
expressions are just too darned useful to give up? Let me
think about that for a second...
Well I don't like OO very much either. I am quite vocal on
that in fact. But OO is a useful tool. Whether or not I
find it fun, I would be foolish to not learn how to use it
and use it effectively. And indeed I have. Likewise no
matter how much fun it might be for me to be tilly against
the world (I can outcode them all!), in the real world that
is a really bad way to do things.
So yes. Try to learn how things really work. But when it
comes down to getting stuff done, don't let your research
stop you from putting out a working solution. And no matter
how much you learn from rolling your own, be aware that your
code, with less testing, outside advice, etc, is going to be
less mature, capable, secure and so on than existing
standard solutions are. Yes, this is even going to be
true most of the time when you are a hotshot programmer who
really is better than the rest. (Which most of us are not
going to be.)
Besides which, going it alone is more work. So do as
Larry says, be lazy and learn to use CPAN. (Yes, even the
modules from CPAN which are internally OO. Do you have to
care if it works?) |