DEV Community

What does Javascript better than Kotlin?

Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard on September 18, 2019

Serious question, not a troll. Javascript and Kotlin are two very different languages but it's always interesting to take a look at what other deve...
Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€ • Edited

Kotlin is for the Jvm ecosystem as far as I can tell, it's not an out and out superset of JavaScript nor is it trying to be. It just happens to have multiple compile targets, one just happens to be JavaScript, but Kotlin is not JavaScript and not really related.

As for features, you will find many aforementioned in multiple other languages.

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard • Edited

My point is that when they designed kotlin, jetbrains has been unafraid to take inspiration and copy what works well in other languages. What helped is that they have in house specialists from every language out there. By following their example I can maybe discover useful design patterns

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€ • Edited

Since the dawn of programming language design people have been borrowing features and applying them to the new language through grammer. I am writing Jess which is based on JavaScript and css syntax, that is because there is a problem here I am trying to solve, inherently I need feature from both languages so that I can have js and css as compile targets. It's the same story for Kotlin, if you could only write a portion of a compile target, say half of JavaScript, you would have an inferior compiler. So IMHO it's nothing to do with design, it's just a problem to solve.

Collapse
 
muhammedmoussa profile image
Moussa

i'm using javascript daily, and agree with you not related topic parts, every language has it's own env, community, advantages and disadvantage, don't forget Kotlin came as alternative for java, so in ancient times we agreed no relation between java and javascript. if there javascript will lose as a programming language.

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard • Edited

I'm not confusing anything.
When I look at Ruby on rails code, it gives me ideas that I can take with me in other languages that are not "related to Ruby".
I don't see it as a good thing that developers don't look at what other communities are doing.
I edited the first sentence of my post.

Thread Thread
 
adam_cyclones profile image
Adam Crockett πŸŒ€ • Edited

I think your post is valid and certainly something I asked myself a few months back. I love the look of Kotlin and I use typescript as much as not.

Another language which you might find interesting is Lua, it has a fascinating community, syntax and backstory.