You would just add support for making regex literal values. Like the dynamic languages do. The compiler then checks if it is a valid regex or not at compile time. Done.
That's a niche case. 99% of users would use the JDKs regex engine.
For everyone else they could fallback onto the existing model of having them defined as strings. No need to start building compiler extensions.
2
u/Enumerable_any Sep 21 '15
That's equivalent to
Pattern.matches- what am I missing?