https://kotlinlang.org logo
d

dmitry.petrov

04/26/2017, 7:05 AM
Not yet. That's just an idea how that could possibly be designed / implemented in Kotlin. Rather shallow one so far.
b

bamdmux

04/26/2017, 7:11 AM
So.. are you telling theres a possibility? 😛
d

dmitry.petrov

04/26/2017, 7:13 AM
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

bamdmux

04/26/2017, 7:24 AM
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

Ruckus

04/26/2017, 3:53 PM
I really don't see the benefit of
val color = ~color/FFCCFF/
over
val color = color("FFCCFF")
Am I missing something specific?
b

bamdmux

04/27/2017, 5:19 AM
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
2 Views