Nice to see that Kotlin gets a proper Path API (cu...
# announcements
r
Nice to see that Kotlin gets a proper Path API (currently experimental). I guess I can soon reduce niok (https://github.com/robstoll/niok) to a few extra extension functions 👍
v
I certainly hope that was denglish and you meant "get", not "becomes" 😄
r
Haha.. indeed, should have written bekomes 😅
n
Sweet, Kotlin added an operator div!
that's all I wanted 🙂 I was afraid it was going to be one of those things where people were like "uhhh non-intuitive use of operators"
Nevermind that
/
is a lot more intuitive for path concatenation than "resolve"
r
@Nir do you know if one can override
/
for other purposes? (with
operator fun...
v
Sure, why not
It is
div
r
ah... this one already exists, good to know
n
Yeah, you can override it however you want. I would say of course, you should use it sparingly 🙂 especiallys ince kotlin has named infix functions, so you don't need the old C++ hack of using operators just ot get infix notation
but for concatenating paths it seems pretty useful since it's the syntax is so pervasive from decades of command line shells
C++ and python have also both adopted
/
for concatenating paths
m
it seems a nice library, but I can’t find an overview of its extensions without looking at source code: a small documentation would be nice!
r
@Matteo Mirk Thanks. I might publish KDoc at some point but I will probably wait to see what functionality I can remove once Kotlin's API for Path is settled.
m
Cool, thanks
r
m
thank you very much, this is much appreciated!