Re:Parsing JSON with a single regex
by viraptor on Tuesday October 22, 2013 @06:50AM
(#6590904)
> Sorry but doing things without understanding or knowing the true consequences of what you are actually writing, always causes bugs. And that's true with any programming language.
I agree with this in general, but not in this situation. Let's say you use a function you verify doesn't contain regex matching. Then someone else changes that function to contain regex - s/he shouldn't need to (and may not be able to) verify every single place where this function is used - introducing a hard to find bug. Who caused a bug here? In my opinion that's the regex engine/language creator who didn't decide to either handle this case correctly in all cases, or explicitly fail in this edge case.
I agree with this in general, but not in this situation. Let's say you use a function you verify doesn't contain regex matching. Then someone else changes that function to contain regex - s/he shouldn't need to (and may not be able to) verify every single place where this function is used - introducing a hard to find bug. Who caused a bug here? In my opinion that's the regex engine/language creator who didn't decide to either handle this case correctly in all cases, or explicitly fail in this edge case.