Not yet. That's just an idea how that could possib...
# language-proposals
d
Not yet. That's just an idea how that could possibly be designed / implemented in Kotlin. Rather shallow one so far.
b
So.. are you telling theres a possibility? 😛
d
There is, although as a syntax sugar for
sigil_op(string)
it doesn't look particularly useful (besides probably supporting additional string delimiters).
See, you can already do it now without additional syntax:
Copy code
fun uuid(s: String) = /* parse string as UUID */
b
Yeah, other character delimiters like elixirs would be cool syntax sugar or saccarine, like val reg = ~r/whatever/ or val color = ~color/FFCCFF/
But I can live without them 😉
r
I really don't see the benefit of
val color = ~color/FFCCFF/
over
val color = color("FFCCFF")
Am I missing something specific?
b
No, its just personal preference. Color is just an example i came with, the sigil I use most in elixir is regex and specially for the modifiers for me looks better,
~r/whatever/i
than
sigil_r("whatever",i)
. But as I said its just syntax saccarine, not even sugar
👍 1