# Safe call with get operator

**URL:** <https://discuss.kotlinlang.org/t/safe-call-with-get-operator/24237>\
**Category:** Language Design\
**Created:** [February 20, 2022, 2:12pm UTC](https://discuss.kotlinlang.org/t/safe-call-with-get-operator/24237 "2022-02-20T14:12:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![donaldtam](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@donaldtam](https://discuss.kotlinlang.org/u/donaldtam)\
**Post date:** [February 20, 2022, 2:12pm UTC](https://discuss.kotlinlang.org/t/safe-call-with-get-operator/24237/1 "2022-02-20T14:12:49Z")

</div>

Any chance we will be able to use ? with the get operator in the future?  
E.g.  
array?[10] instead of array?.get(10)

---

<div class="post-metadata">

**Author:** ![Meodinger](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/meodinger/32/9028_2.png) [@Meodinger](https://discuss.kotlinlang.org/u/Meodinger)\
**Post date:** [February 21, 2022, 1:50pm UTC](https://discuss.kotlinlang.org/t/safe-call-with-get-operator/24237/2 "2022-02-21T13:50:18Z")

</div>

Maybe?

What I am concerned about is that if we are able to use `?[]` as `?.get()`, should we be able to use `?=` as `?.set()` ? What’s more, `?()` as `?.invoke()`, `?+` as `?.plus()` and `?-` as `?.minus()` ?

---

<div class="post-metadata">

**Author:** ![donaldtam](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@donaldtam](https://discuss.kotlinlang.org/u/donaldtam)\
**Post date:** [February 21, 2022, 4:53pm UTC](https://discuss.kotlinlang.org/t/safe-call-with-get-operator/24237/3 "2022-02-21T16:53:14Z")

</div>

perhaps they could limit it to the get operator

---

<div class="post-metadata">

**Author:** ![nguyen-sde](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@nguyen-sde](https://discuss.kotlinlang.org/u/nguyen-sde)\
**Post date:** [March 11, 2022, 9:04am UTC](https://discuss.kotlinlang.org/t/safe-call-with-get-operator/24237/4 "2022-03-11T09:04:39Z")

</div>

I vote for all your proposals 👍
