3 ms·
If it isn’t syntax then it is a function/method call. By being a method call, one can define default options, allowing overridability.
by FrancoisBosun 5y ago
If it isn’t syntax then it is a function/method call. By being a method call, one can define default options, allowing overridability.
- djur 5y agoThey could easily add another regex flag to indicate a "safe" regex. That really isn't the problem here. The problem is that adding a safe regex engine doesn't retroactively fix the thousands and thousands of regexes in gems which can't be unilaterally forced over to the new engine.
- jatone 5y agoactually that is the problem. no they can't 'easily' add a new flag (or they would have). it doesn't fix the problem of being broken by default and any fundamental change in behavior will lead to problems as well. the point is the language is broken fundamentally and because its syntax sugar there isn't anything you can do realistically. a function call can be replaced, deprecated, and then removed and all of that can be automated and be non-disruptive over a few releases.