Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated .compile() call in .add() #7

Open
crawfordcomeaux opened this issue Jul 22, 2013 · 2 comments
Open

Remove deprecated .compile() call in .add() #7

crawfordcomeaux opened this issue Jul 22, 2013 · 2 comments

Comments

@crawfordcomeaux
Copy link
Contributor

regex.compile is deprecated and isn't supported in Opera.

I'm not sure how to do this without creating a new VerbalExpression object to return every time .add is called, though.

@jehna
Copy link
Contributor

jehna commented Jul 22, 2013

This raises another issue:

var shouldNotChange = VerEx().anyOf("abc");
var variable2 = shouldNotChange.then("def");

( variable == shouldNotChange ) // return true

When we always apply the modification to the current object, the outcome isn't quite logical. In the case above, the shouldNotChange variable .. should not change in my opinion.

So rather than compiling the original object, we probably should always return a new VerbalExpression object.

@crawfordcomeaux
Copy link
Contributor Author

I was thinking returning a new VerbEx (who's ready to bikeshed over VerEx vs VerbEx??) object each time would be extraneous, but you're right. Makes much more sense to always return a new VerbEx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants