7 ms·
Meta Joins Kotlin Foundation
- grizzles 1y agoI use kotlin at work every day and I'm suprised it (and particular Kotlin/Compose Multiplatform) are not more popular. It's a true alternative to javascript that lets you share native ui code across web,ios,android,desktop and more (eg. watchOS).
- paulryanrogers 1y agoDo you mean a 'Java' alternative?
- herval 1y agoall the cross-platform alternatives are either very low level (C++) or Javascript, so I'm guessing they actually meant Javascript (Electron, React Native, etc)?
- mock-possum 1y agoI know this is a bit nitpicky but - if you have to compile Kotlin into a WASD binary, then use JavaScript to load it, is that really ‘native?’ You can just run JavaScript right out of the url field or the console in the browser, no compilation or server required - that’s what I would think of as ‘native.’
- Tainnor 1y agoTo me, it feels like Kotlin for the backend isn't really all that popular in the US from what I read on HN, but here in Europe there are a lot of companies (big and small) using it. Maybe it's the geographic proximity (JetBrains being a Czech company).
- ksec 1y agoI am not sure if it has something to do with age. But I found both Kotlin and Swift share pretty much the same thing. Over Complexity. Objective C and Java works. I am also wondering if Meta still uses PHP or Hack.
- ckwalsh 1y ago> I am also wondering if Meta still uses PHP or Hack Meta’s WWW codebase is its oldest, and still written in Hacklang. Lots of internal tooling is also written in Hack. I wouldn’t be surprised if there are more committed lines of Hacklang than any other language (although, a good chunk of that is codegen, vs other core languages where codegen is part of the build process).
- ameliaquining 1y agoWhy don't they do codegen at build time in Hack?
- paxys 1y agoHack does JIT compilation. Even otherwise, at the scale the company operates it's much better to run codegen once at commit time rather than recreate the entire codebase on every deploy (several times a day) which would take forever.
- ameliaquining 1y agoWhy don't they do the same in other languages, then?
- arein3 1y agoI really miss Kotlin's null safety in Java
- vips7L 1y agoI really miss Java’s exception safety in Kotlin. If Java ever ships Valhalla we might get null restricted types: https://openjdk.org/jeps/8316779 https://openjdk.org/jeps/8316779
- Tainnor 1y ago> I really miss Java’s exception safety in Kotlin. Java is the only language that I'm aware of with checked exceptions (Swift has "throws" which I guess goes in that direction but is untyped) and it's in my experience not notably exception-safer than languages that use values for error handling (such as Rust, Haskell or Kotlin). Swallowing exceptions because of bad ergonomics or misuse by library authors is unfortunately fairly common in a lot of Java code that I've seen. By contrast, most Kotlin code that I've seen uses exceptions only for unrecoverable errors and otherwise uses some sort of sum type (Result, Either or some sealed class/interface). These can be handled ergonomically and in a very type-safe manner - and importantly they don't break when used with higher-order functions. In the future, Kotlin will have Rich Errors which will have even better ergonomics (I'm personally fine with Either, but I know some people dislike a heavily functional style, so this will be good for them).
- Apofis 1y agoKotlin is awesome, good on Meta.