What do you think about upcoming namespace keyword?

What do you think about upcoming namespace keyword?

Outside of classes, I can either declare functions as top level, or put them inside an

object

. Personally I really

object

, to me it just makes everything way more readable.

In this talk about the future of Kotlin it seems that they will address this with

namespace

.

The reasoning is that some people (like me) use

object

just to create a namespace, but don’t care creating an instance or a type of that object. To me, this just seems so perfect!

I don’t know much about how Kotlin releases, but I searched for “kotlin namespace keyword” and couldn’t find much about this topic. I was wondering when could I expect this feature to come, or if it’s any good. Are there downsides to it?

submitted by /u/cris_null
[link] [comments]