user
04/16/2021, 3:45 PMhttps://pbs.twimg.com/media/EzGzm5fW8AQPZ08.jpg▾
James Richardson
04/16/2021, 3:59 PMnanodeath
04/16/2021, 4:09 PMMilan Hruban
04/16/2021, 4:11 PMfirstNotNullOfOrNull
is quite useful in my opinion, I do have exactly that function in my "util" library right now.
The '/' operator for Path I don't like at allJames Richardson
04/16/2021, 4:37 PMShawn
04/16/2021, 4:59 PMfirstNotNullOfOrNull
is a pretty common pattern that substantial number of developers have had to reimplement (myself included).
The path thing is pretty ergonomic imho but more importantly, it’s still an experimental API… and the point of an experiment is to test things. Maybe folks will use it, maybe it’s a bad idea; we’ll see in due time. It’s not being thrown in without consideration.nanodeath
04/16/2021, 5:03 PMOliver.O
04/16/2021, 5:04 PM/
operator since version 3.4 released in 2014. I've been working with these extensively and found them quite useful (Linux only). They're probably even more useful when dealing with diverse operating systems having different path separators such as Linux/Windows.Nir
04/16/2021, 5:08 PM/
for paths is really nice. Both python and C++ have it.Nir
04/16/2021, 5:08 PMNir
04/16/2021, 5:10 PM/
ought to be extremely intuitive to the average developer.nanodeath
04/16/2021, 5:10 PMNir
04/16/2021, 5:11 PMnanodeath
04/16/2021, 5:13 PMnanodeath
04/16/2021, 5:13 PMnanodeath
04/16/2021, 5:13 PMCasey Brooks
04/16/2021, 8:08 PMinline
and don’t impact your application size unless you use them. So if you don’t like it, just don’t use it; it’s not hurting your app at allnanodeath
04/16/2021, 8:10 PMCasey Brooks
04/16/2021, 8:18 PMInlineOnly
, which I believe keeps them out of the runtime jar and only available on the compile classpathilya.gorbunov
04/16/2021, 9:47 PMJames Richardson
04/17/2021, 10:39 AMMatteo Mirk
04/19/2021, 9:15 AMStephan Schroeder
04/26/2021, 6:35 AMval path = Path("Dir").div("SubDir").div("file.txt")
. I read about this literally on the same day I read Effective Kotlin's (https://leanpub.com/effectivekotlin ) item 12: "Operator meaning should be consistent with its function name". Well, I guess "devided by" kind of fits. (on the other hand, the thing that is diveded by is the operator itself and not the operand 🤔)