Re:A regular expression to check for prime numbers
by baddox on Monday July 05, 2010 @01:39AM
(#1487389)
The problem with that is that it ruins the excitement from hearing that "a regular expression can solve problem X." I believe most regex implementations are actually Turing complete, so it's no surprise that a problem can be solved with them. But that's just another CS-theory person argument.
[ Parent
| on HN ]
Re:A regular expression to check for prime numbers
by _delirium on Monday July 05, 2010 @04:23AM
(#1487682)
Yeah, I see regexes as more of a question of expression, in the pragmatic human programmer sense, rather than formal expressibility. Some things are natural and easy to write using regexes, and some are much better done some other way, but I'm not sure the Chomsky hierarchy shows where that boundary is.