# Why can not type of function parameters with default value be omited?

**URL:** https://discuss.kotlinlang.org/t/why-can-not-type-of-function-parameters-with-default-value-be-omited/3641
**Category:** Language Design
**Created:** [July 6, 2017, 9:42am UTC](https://discuss.kotlinlang.org/t/why-can-not-type-of-function-parameters-with-default-value-be-omited/3641 "2017-07-06T09:42:00Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![yole](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/yole/32/1425_2.png) [@yole](https://discuss.kotlinlang.org/u/yole)
#### Post date: [July 6, 2017, 2:21pm UTC](https://discuss.kotlinlang.org/t/why-can-not-type-of-function-parameters-with-default-value-be-omited/3641/2 "2017-07-06T14:21:58Z")

</div>

The main reason is compilation performance. When we look at a method call, it helps a lot to have explicit parameter types which don’t need to be inferred. Inferring the parameter type from a string constant is trivial, but if you have `fun foo(a = bar())` and `bar()` also has an inferred return type, understanding the actual parameter type of `a` becomes very expensive.

---

_[View the full topic](https://discuss.kotlinlang.org/t/why-can-not-type-of-function-parameters-with-default-value-be-omited/3641)._
