Kotlin for Typescript developers

preview_player
Показать описание
Subscribe

This video is meant for Typescript developer interested in Kotlin. I cover the syntax, tooling and create a general project. If you're on the fence about trying Kotlin, I hope that this can be helpful.

Thank you so much for taking the time to watch

Github:

Twitter:

Discord

Twitch:

Timestamps
0:00 - Agenda
0:32 - Advantages
1:32 - Syntax
3:28 - Code Editor
4:22 - Build & Dependency Management
6:47 - Web Server
9:07 - Outro
Рекомендации по теме
Комментарии
Автор

Gradle is the single biggest turn off for using any JVM language. I wish it was much much simpler

nanonkay
Автор

There is a kotlin language server that has been put together by the community and is added to mason (a LS downloader plugin for nvim). I use ktlint for formatting too, and the pair is not quite as robust as intellij, but I've started using it recently and it's pretty good.

AlexAvance
Автор

I've been using kotlin for almost 2 years now it's my most favourite language.. i found myself losing some brain cells when using TS.

devatrii
Автор

absolutely lovely video
i liked how you likened a lot of kotlin's language features to their js counterpart (like ktor or maven being counterparts of express or npm)

kuritho
Автор

I can't change my editor :( I will wait lsp and meybe then try it, kotlin looks pretty

snatvb
Автор

The beauty of Kotlin is that you have the most straight-forward easy-as-JS language for the most used consumer OS in the world to compile natively for ..., Android. And the tooling allows you to really do anything you want with Kotlin. The sad part about Kotlin is the tightness towards JetBrains and what not, and the world falls apart out of their walled garden. So many people (incl. me) fail to attempt to work on an Android project within NeoVim for instance (other than editing a bit here and there). The whole thing can get so massively complex that it causes mobile development to have such bad reputation. I really just get frustrated with it that I end up opening Android Studio eventually. Same story as with Xcode and iOS. The way we built our mobile systems shall be more secure and consumer friendly, but also way too complex and inaccessible for the free-minded.

_modiX
Автор

Very cool and clear video. Thank you, Tom! I'm really looking forward to do something with Kotlin!

Bruno-bhdm
Автор

Kotlin for backend?
Thought only java is used.

saiphaneeshk.h.
Автор

Imo, you should have gone in-depth into typescript interfaces because there's no direct equivalent in Kotlin (i.e. differences between nominal and structural typing), and if it were, I would say actual Kotlin interfaces are the closest to it and not data classes.


With Kotlin interfaces you can pretty much do almost the same thing as TypeScript interfaces. You can have classes implement those interfaces, but you can also have objects do the same:

```
interface Foo {
val prop: Int
}

val instance = object : Foo {
override val prop: Int = 1
}
```

Another critique is that, imo, the equivalent of an object in TypeScript (it's not as usual to call it a map other than by people coming from other languages, specially since there's an actual map class already) is an object in Kotlin (above example also works here). The closest thing to Kotlin's maps in TypeScript is the class Map (which is basically a LinkedHashMap since it preserves insertion order)

lengors
Автор

How does the interop with java work? Is it possible to convert an existing java program into kotlin? Do Java packages run the same? Is springboot available?

kiikoh
Автор

Kotlin is a nice language, especially from the point of view of syntax. But I feel like it takes a lot of configuration to run it (properly) outside of Jet Brain's IDE(s) and to use it for anything other than android development. If the tooling (for editors other than IntelliJ) was improved it would be make for a great alternative to JS, taking into account the fact that there's already a lot of languages (other than TS) that can do that pretty well.

aimanbasem
Автор

what are your thoughts on sqldelight? It lets you write sql queries manually and will generate kotlin accessors for them.

gyoge
Автор

Ok I might be learning kotlin for android development

Serizon_
Автор

Once you're deep enough into Typescript, every type system feels like a step down unfortunately. The only one that feels comparable is Zig's which doesn't have a language server that can properly represent it yet.

I think to me the most amazing Typescript-ey thing is being able to take an existing type and do weird things to it, like making every key in a map have a prefix, or transforming all child types to a new type based on the input value... the flexibility is insane, which is just to allow for the type system to model all the weird stuff in the javascript library ecosystem, but makes using it so fun. Stepping away from it in any direction is a bit painful.

nathanfranck
Автор

map? in typescript? where are those docs? "foreach {" is not simpler, it's cognitive shiarrea because it tells you to read and just accept that from now on you shall not pass,

josersleal