I don’t see much improvement that sigils make w.r....
# language-proposals
e
I don’t see much improvement that sigils make w.r.t top-level functions. They definitely make tooling trickier. Writing
Regex("haba")
instead of
~r/haba/
is only slightly more verbose, but way more readable. The only potential issue that one can see here is performance, e.g. that the function is being invoked at run-time, but there’s a much less intrusive way to solve that: https://youtrack.jetbrains.com/issue/KT-14652
👍 6
b
Yeah sure, the main point will be that, be able to create a constant regexp for example. Having the
r/reg/
would be cool syntaxis sugar (for me). But as I said in other thread I would be perfectly fine having
const val regex = sigil_r("whatever","i")