Hey, after the seeing the change in <https://githu...
# language-proposals
h
Hey, after the seeing the change in https://github.com/Kotlin/KEEP/issues/190 and the discussion about
2.days or Duration.days(2)
I would bring a pitch solving this design:
val timeToFix: Duration = .days(2)
This design is used in Swift. In Swift, every static function (or enum case) can be called by using a short dot annotation. This is also useful in function parameters
Copy code
fun something(r: Result<String>) { }

something(.success("Hello")
In Kotlin, there are no static functions, but there is a
companion object
. All functions of the companion object could be called using this syntax.
2
h
Almost. I do know the import feature, but you need an import statement until this issue is fixed. I would also extend this feature to "static" functions as well, like in Swift.