# Import from singleton object?

**URL:** <https://discuss.kotlinlang.org/t/import-from-singleton-object/393>\
**Category:** Uncategorized\
**Created:** [December 2, 2014, 9:41pm UTC](https://discuss.kotlinlang.org/t/import-from-singleton-object/393 "2014-12-02T21:41:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobNik](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@RobNik](https://discuss.kotlinlang.org/u/RobNik)\
**Post date:** [December 2, 2014, 9:41pm UTC](https://discuss.kotlinlang.org/t/import-from-singleton-object/393/1 "2014-12-02T21:41:03Z")

</div>

It seems like this would be useful. Any plans to do it? Similar to Scala, I'd like to be able to call functions from a singleton without the prefix.

object Thing {  
 &nbsp;&nbsp;fun foo(x: Int) { }  
}  
…  
import Thing.foo  
…  
foo(123)

Is there a different way to do this in Kotlin?

Rob

---

<div class="post-metadata">

**Author:** ![MarioArias](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/marioarias/32/1488_2.png) [@MarioArias](https://discuss.kotlinlang.org/u/MarioArias)\
**Post date:** [December 3, 2014, 4:54pm UTC](https://discuss.kotlinlang.org/t/import-from-singleton-object/393/2 "2014-12-03T16:54:51Z")

</div>

You could define your functions outside the object AKA package level functions

In that case you just import the package with \* and that’s all

```kotlin
import com.mycompany.util.*

foo(123)
```

---

<div class="post-metadata">

**Author:** ![RobNik](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@RobNik](https://discuss.kotlinlang.org/u/RobNik)\
**Post date:** [December 3, 2014, 5:11pm UTC](https://discuss.kotlinlang.org/t/import-from-singleton-object/393/3 "2014-12-03T17:11:03Z")

</div>

That's probably all I need. +1 for simplicity.

Rob
