# listOf, arrayListOf, setOf, etc

**URL:** <https://discuss.kotlinlang.org/t/listof-arraylistof-setof-etc/1475>\
**Category:** Libraries\
**Created:** [February 15, 2016, 8:25pm UTC](https://discuss.kotlinlang.org/t/listof-arraylistof-setof-etc/1475 "2016-02-15T20:25:49Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ilya.gorbunov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/ilya.gorbunov/32/1645_2.png) [@ilya.gorbunov](https://discuss.kotlinlang.org/u/ilya.gorbunov)\
**Post date:** [February 18, 2016, 2:20am UTC](https://discuss.kotlinlang.org/t/listof-arraylistof-setof-etc/1475/5 "2016-02-18T02:20:47Z")

</div>

Long time ago we defaulted all maps and sets to be linked because it was really confusing to loose order in many practical applications.  
If you want a hashset for performance/memory reasons you can obtain it with `hashSetOf()` or `toHashSet()` functions.  
You cannot change the default behavior of `setOf` in the standard library, but if you really want, you can hide it with your own explicitly imported `setOf` function (`import my.utils.setOf`), though I wouldn’t recommend it as a long term solution.

---

_[View the full topic](https://discuss.kotlinlang.org/t/listof-arraylistof-setof-etc/1475)._
