3 ms·
Why use this over TypeScript?
by glued 9y ago
Why use this over TypeScript?
- bitL 9y agoIt's for JDK (tooling) addicts.
- lomnakkus 9y agoKotlin's type system isn't hampered by (runtime) compatibility with the JS object model. (That would be one reason, I'm sure there might be others.)
- lf-non 9y agoPrimarily because Kotlin is not a superset of javascript and thus does not inherit the quirks of javascript. Other than that, if your backend is kotlin then you can potentially share (non JVM dependent) business logic code with the backed. Same goes for android clients. Same interfaces can be be used in client and server.
- jrs95 9y agoI've never really found a good use case for reusing business logic, but just reusing types is pretty helpful. Although you can also get that via something like Swagger as well.
- lomnakkus 9y agoI too am more of a fan of the Swagger/OpenAPI approach (in general terms), but I find it valuable to be able to share validation logic too. (Unless your validation requirements are extremely simple.) Of course Swagger/OpenAPI doesn't preclude using the same language on the client and server side, so one could always combine "isomorphic" approach with the "service definition" approach.