Join Slack
Powered by
<https://github.com/JetBrains/kotlin-web-site/blob...
# codingconventions
m
marcinmoskala
11/21/2017, 2:48 PM
https://github.com/JetBrains/kotlin-web-site/blob/yole/styleguide/pages/docs/reference/coding-conventions.md#platform-types
What is wrong with unsafe casting there if we know that type cannot be null?
y
yole
11/27/2017, 4:54 PM
not sure what you mean. do you prefer
val foo = bar() as String
to
val foo: String = bar()
? why?
m
marcinmoskala
11/29/2017, 5:36 AM
When I don't want explicit type then I prefer
val foo = bar()!!
y
yole
11/29/2017, 1:21 PM
We won’t recommend using
!!
anywhere in the style guide 🙂
2
Views
Open in Slack
Previous
Next