# Suffix/infix notation for properties

**URL:** <https://discuss.kotlinlang.org/t/suffix-infix-notation-for-properties/1853>\
**Category:** Uncategorized\
**Created:** [July 8, 2016, 3:26pm UTC](https://discuss.kotlinlang.org/t/suffix-infix-notation-for-properties/1853 "2016-07-08T15:26:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfulton26](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@mfulton26](https://discuss.kotlinlang.org/u/mfulton26)\
**Post date:** [July 8, 2016, 3:26pm UTC](https://discuss.kotlinlang.org/t/suffix-infix-notation-for-properties/1853/1 "2016-07-08T15:26:55Z")

</div>

Any chance we can get a suffix/infix notation for member/extension properties? e.g.:

```kotlin
suffix val Int.seconds: Duration
    get() = Duration.ofSeconds(toLong())

```

So that instead of

```kotlin
val duration = 12.seconds

```

we can write

```kotlin
val duration = 12 seconds

```

and instead of

```kotlin
val duration = ((-12).seconds).abs()

```

we can write

```kotlin
val duration = -12 seconds abs()

```

---

<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 8, 2016, 3:40pm UTC](https://discuss.kotlinlang.org/t/suffix-infix-notation-for-properties/1853/2 "2016-07-08T15:40:29Z")

</div>

We have no such plans. The parsing ambiguities seem to be scary.

---

<div class="post-metadata">

**Author:** ![sksamuel](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/sksamuel/32/1904_2.png) [@sksamuel](https://discuss.kotlinlang.org/u/sksamuel)\
**Post date:** [July 9, 2016, 8:46pm UTC](https://discuss.kotlinlang.org/t/suffix-infix-notation-for-properties/1853/3 "2016-07-09T20:46:23Z")

</div>

Suffix notation has been deprecated in Scala because of the parsing ambiguities.

---

<div class="post-metadata">

**Author:** ![mfulton26](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@mfulton26](https://discuss.kotlinlang.org/u/mfulton26)\
**Post date:** [July 18, 2016, 8:00pm UTC](https://discuss.kotlinlang.org/t/suffix-infix-notation-for-properties/1853/4 "2016-07-18T20:00:43Z")

</div>

Yes, I guess I was wondering if the fact that it is a property and not a function means that the ambiguities are fewer/non-existent but it does not appear so. Thanks.
