In any case, what did you need this for?
I assume you mean having the class respond to methods that match a regexp?
So you can have a user input commands without having to type the whole
command. Also for having aliases for commands without having to write each
method to call the main method.
Personally I think its kinda neat. I love the power of regular expressions.
Not to mention that the regexp is data and so can be read at runtime from a
database/file. I know that due to this layer of indirection that it will
make execution slower, but thats what faster machines are for
“Mike Campbell” firstname.lastname@example.org wrote in message
Would it be possible to see if a regular expression intersects with
regular expression, and if so not add the one that overlaps?
it might be possible, but damned difficult.
It’s been too long since my CS days, but something about that makes me
it’s … not, at least not with any sort of reasonable time. But I have
of my doubt, too, so…
In any case, what did you need this for? In 15 years of professional
programming (granted, not all of it OOP), I can’t think of a case where I
have even considered this to be a solution to a problem. But I haven’t
the problems there are yet, so I’m sure I’m missing a few. =)