# Maybe Kotlin can be a good addition to Elements

**URL:** https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585
**Category:** Non-Tech
**Created:** [May 31, 2016, 2:15pm UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585 "2016-05-31T14:15:45Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![contoso](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/c/5f9b8f/32.png) [@contoso](https://talk.remobjects.com/u/contoso)
#### Post date: [May 31, 2016, 2:15pm UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/1 "2016-05-31T14:15:45Z")

</div>

Although, iam studying Oxygene and silver,

I recently discovered Kotlin the JVM language.

I can’t imagine how comeplex it is to add another language.

but it would be awesome to use elements with kotlin language.

just saying.

Thank you

---

<div class="post-metadata">

### Author: ![sandeepc24](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/76d3ee/32.png) [@sandeepc24](https://talk.remobjects.com/u/sandeepc24)
#### Post date: [May 31, 2016, 9:04pm UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/2 "2016-05-31T21:04:41Z")

</div>

My vote would be for F#. Although I am still learning it but I am really liking what I have seen so far.

---

<div class="post-metadata">

### Author: ![sandeepc24](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/76d3ee/32.png) [@sandeepc24](https://talk.remobjects.com/u/sandeepc24)
#### Post date: [July 20, 2016, 12:37am UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/3 "2016-07-20T00:37:35Z")

</div>

Would it be a big task to make F# work with your tool chain?

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [July 20, 2016, 6:15am UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/4 "2016-07-20T06:15:08Z")

</div>

Quite a big task. F# is vastly different than any of the languages we have now.

---

<div class="post-metadata">

### Author: ![flima](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@flima](https://talk.remobjects.com/u/flima)
#### Post date: [November 22, 2016, 5:23am UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/5 "2016-11-22T05:23:10Z")

</div>

I prefer Groovy support.  
Groovy can use the same syntax of Java but add many functionalities not present at Java with a cleaner syntax.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [November 22, 2016, 11:54am UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/6 "2016-11-22T11:54:51Z")

</div>

What does Groovy (or Kotlin) give that isn’t covered by either Oxygene, C# or Swift?

---

<div class="post-metadata">

### Author: ![flima](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@flima](https://talk.remobjects.com/u/flima)
#### Post date: [November 22, 2016, 5:54pm UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/7 "2016-11-22T17:54:02Z")

</div>

Probably nothing, just the better syntax especially compared with Swift optionals.

---

<div class="post-metadata">

### Author: ![flima](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@flima](https://talk.remobjects.com/u/flima)
#### Post date: [November 22, 2016, 6:12pm UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/8 "2016-11-22T18:12:53Z")

</div>

Groovy could be a good replacement for Java, maybe could be used instead or together Java at Iodine.  
Groovy syntax is less redundant and Groovy can infer type. For example:  
Java:  
Client c = new Client()  
Grovy:  
def c = new Client()  
And c will be a Client at both.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [November 22, 2016, 8:02pm UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/9 "2016-11-22T20:02:24Z")

</div>

(a) have you tried `var c = new Client()` in our Java preview? 😉

(b) all our languages also have type inference, so I’m that’s not really a big selling point for Groovy, on its own…

---

<div class="post-metadata">

### Author: ![flima](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@flima](https://talk.remobjects.com/u/flima)
#### Post date: [November 22, 2016, 9:07pm UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/10 "2016-11-22T21:07:49Z")

</div>

Very nice to know that! It helps a lot! 👍 😄  
But Groovy can do others things like:

> ```
> class A {
> String getA1() {
> return "1"
> }
> }
> 
> ```

> ```
> var a = new A()
> print (a.a1) // will print 1
> 
> ```

As you can see the **a1** property was not directly defined at code but infered by Groovy because we defined an accessor: get or set. In fact, a1 is a read-only property as we do not defined a set accessor.

Another possibility is:

> ```
> class A {
> String a1 = "1"
> }
> 
> ```

> ```
> var a = new A()
> a.a1 = "T"
> 
> ```

In that case Groovy will create for us the get and set accessors.

Groovy has a lot of syntax sugars that Java don’t have and a better support to introspection because Groovy is a dynamic language designed for scripts.

In fact a Groovy script is a class itself. Then if I had a script named **a.groovy** with follow code:

> String a1 = “1”

I could import it as a class and make:

> var a = new A()  
> print a.a1

The name of script will be the name of the class 😉

I could say much more but instead of a post it will be a book 😆

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [November 22, 2016, 10:17pm UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/11 "2016-11-22T22:17:27Z")

</div>

ok. i get that the _Java_ language (currently 😉 is limited. but none of this bows me away as a C#, Oxygene or Swift developer?

---

<div class="post-metadata">

### Author: ![flima](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@flima](https://talk.remobjects.com/u/flima)
#### Post date: [November 23, 2016, 3:36am UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/12 "2016-11-23T03:36:27Z")

</div>

Swift is a good replacement but optionals have a complex syntax, when we need to accept null.  
I like both Swift and Groovy and I am using both at my projects, I just prefer Groovy than Java to write code to Java platform where Groovy integrates very nice.  
Groovy have an advantage that can run a Java code without modification. Groovy is 100% compatible with Java. I just think that Groovy is better than Java itself and could be supported in the place of Java language with many advantages.  
Groovy would be a better addition to Elements than Java itself because we could create code at Groovy style or Java style including a mix with a few of each. Considering that you intend to support Java language why not Groovy instead? Just will add more funtionalities than Java without any loss.  
I don’t think that Groovy competes with Oxygene, C# or Swift but with the new Java support, where I think that add Groovy support will be advantage. Just my 2 cents.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [November 23, 2016, 11:12am UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/13 "2016-11-23T11:12:39Z")

</div>

i suppose if Groovy is a full superset of Java, we could look at supporting it as part of Iodine… i’ll have a look…

---

<div class="post-metadata">

### Author: ![flima](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@flima](https://talk.remobjects.com/u/flima)
#### Post date: [November 23, 2016, 10:38pm UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/14 "2016-11-23T22:38:25Z")

</div>

Yes!!! Nice to hear that! 😄

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [November 24, 2016, 5:52am UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/15 "2016-11-24T05:52:50Z")

</div>

Reading up on groovy: [http://stackoverflow.com/questions/4272068/is-groovy-syntax-an-exact-superset-of-java-syntax](http://stackoverflow.com/questions/4272068/is-groovy-syntax-an-exact-superset-of-java-syntax)

groovy isn’t a strict superset of java?

---

<div class="post-metadata">

### Author: ![flima](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@flima](https://talk.remobjects.com/u/flima)
#### Post date: [November 28, 2016, 10:01pm UTC](https://talk.remobjects.com/t/maybe-kotlin-can-be-a-good-addition-to-elements/9585/16 "2016-11-28T22:01:34Z")

</div>

Well, appear that you found an incompatibility unknown by me.
