4 ms·
> use exactly the same language in all you stack isn't this what people are doing with JavaScript?
by superzadeh 10y ago
> use exactly the same language in all you stack
isn't this what people are doing with JavaScript?
- mathw 10y agoIt is, but the problem with that is that they're doing it in JavaScript. Kotlin could offer better performance and certainly offers strong type safety throughout the stack, which I at least certainly believe gives a better programming experience.
- hasenj 10y agoHave you tried TypeScript?
- deno 10y agoTypescript is nice but its type system is not the strongest selling point. For example this compiles without warnings: const foo: Promise<string|null> = Promise.resolve(null); const bar: Promise<string> = foo; bar.then((value) => value.toString()); // runtime null error
- coldtea 10y agoThat's because null is an acceptable value for a string object. Which is the same thing as in Java and plenty of other languages.
- mathw 10y agoA bit. It's an improvement, but if you're writing Kotlin on the backend then Kotlin/JS starts to look tempting on the basis that it's the same language everywhere. Although using the same language in different environments obviously feels a bit different.
- jorgemf 10y agoyou don't have co-routines in JavaScript, you cannot use java libraries in JavaScript, the tooling support for java/kotlin is much better than for JavaScript, Javascript is weakly typed,... In general I think kotlin is much better language. JavaScript has a lot of issues
- proyb2 10y agoThe problem with Javascript can't handle complex computation where Swift could run on both Android, iOS, embedded, cloud, Linux and web server and majority of C/C++ libraries. Soon they might found way to implement Rust memory model, concurrency and Coroutine like Go. It will be nearly perfect or as good without writing 4 different languages. Kotlin could run on all supported platforms and reuse Java libraries.
- jorgemf 10y agoYou have coroutines in kotlin! and the support for native executables has started. Swift is also a very nice language, with a couple of issues: the tooling support and its instability in the first versions. But I also miss one thing from swift in kotlin: its memory model (maybe Rust one is better but I don't know it)
- proyb2 10y agoI know Microsoft contributed Coroutines to LLVM and now experimental in 4.0.0 and .Net core. Which is even awesome for Microsoft to adopt LLVM.