News for hackers. Stuff that matters.
Re:A human way to define regular expressions in Ruby by fendrak on Thursday September 05, 2013 @06:12PM (#6337449)
Under the hood, what's being generated is still a regex though. How can you be sure ANY code is correct, aside from testing it?
Re:A human way to define regular expressions in Ruby by misterbwong on Thursday September 05, 2013 @06:22PM (#6337500)
True, but your argument can apply to any sort of abstraction (e.g. using C instead of assembly or even assembly over 1's and 0's).

He's arguing that the nicer syntax is a valuable abstraction over regex's overly-complicated syntax, not that the syntax will be 100% the same as regex 100% of the time.

Re:A human way to define regular expressions in Ruby by hcarvalhoalves on Thursday September 05, 2013 @07:02PM (#6337691)
> How can you be sure ANY code is correct, aside from testing it?

Apparently, we can't. So, you really want to improve your odds of writing correct code at the first attempt by making the language work with you rather than against.

Replacing a bunch punctuation with code that reads like prose is one way.