# Keywords var and val are too similar

**URL:** <https://discuss.kotlinlang.org/t/keywords-var-and-val-are-too-similar/75>\
**Category:** Uncategorized\
**Created:** [October 12, 2015, 7:17pm UTC](https://discuss.kotlinlang.org/t/keywords-var-and-val-are-too-similar/75 "2015-10-12T19:17:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mduka](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@mduka](https://discuss.kotlinlang.org/u/mduka)\
**Post date:** [October 12, 2015, 7:17pm UTC](https://discuss.kotlinlang.org/t/keywords-var-and-val-are-too-similar/75/1 "2015-10-12T19:17:37Z")

</div>

I like Kotlin, but there is an issue with the readability on one point: In my opinion the two keywords val and var are too similar. Both are only 3 characters in length and the first two characters are same. This makes it very difficult to distinguish them when reading source code. I believe that the readability of source code is very important and therefore keywords should be chosen that are easier to distinguish. For example: var and const

---

<div class="post-metadata">

**Author:** ![medium](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/medium/32/10404_2.png) [@medium](https://discuss.kotlinlang.org/u/medium)\
**Post date:** [October 12, 2015, 7:34pm UTC](https://discuss.kotlinlang.org/t/keywords-var-and-val-are-too-similar/75/2 "2015-10-12T19:34:08Z")

</div>

I like the two keywords since they are short, have the same length (what leads to very readable code formatting) and they are expressive. I've never heard anyone complaining about var and val in Scala. There is simply no reason to worry in practice.

---

<div class="post-metadata">

**Author:** ![andrewoma](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@andrewoma](https://discuss.kotlinlang.org/u/andrewoma)\
**Post date:** [October 13, 2015, 5:03am UTC](https://discuss.kotlinlang.org/t/keywords-var-and-val-are-too-similar/75/3 "2015-10-13T05:03:28Z")

</div>

Hi Michael,

I believe almost everyone will use IntelliJ to edit Kotlin sources and using it vars are highlighted very differently (underscored) - so there’s no chance of accidentally using a var.

Cheers,  
Andrew
