Raw String Literal Library Support
john.r.rose at oracle.com
Wed Mar 14 15:25:32 UTC 2018
On Mar 14, 2018, at 6:11 AM, Peter Levart <peter.levart at gmail.com> wrote:
> Now if 'string' above is a constant, '~ string' could be a constant too. Combined with raw string literals, Pattern constants could be very compact.
> What do you think?
There's no need to introduce syntax in order to gain constant folding.
It's enough to ensure that Pattern.compiler(constant) reduces to
the ldc of a dynamic constant. We are experimenting on such
(This is very vaguely similar to constexpr in C++, but less static.
It's early days, but enough to show that syntax isn't necessary.)
More information about the core-libs-dev