Why was the change made for Duration from `2.secon...
# announcements
s
Why was the change made for Duration from
2.seconds
to
Duration.seconds(2)
? One is significantly less convenient to use.
n
adding DSL methods onto primitives seems kinda yucky to me. I don't want
2.<tab>
to give me dozens of unrelated options.
but also I'd be curious in the official rationale
s
I mean - because it’s part of the stdlib, it seems pretty natural. I’m definitely going to add extension methods that do this though. I’m fine with them being optional though.
n
I'm 100% on board with having those extensions in a separate module that you have to opt into
1
n
weren't they always in another module though
the thing is that Kotlin will offer you auto completions that aren't already imported, that's part of the point, and then automatically import them if you pick them
At least, that's what I thought?