Title
m

mikehearn

01/26/2017, 11:05 AM
so i can answer some questions about this if you like
m

mk

01/26/2017, 11:07 AM
mikehearn: great! I was first wondering how the decision was made within the team, especially considering that not everyone on the team might have been familiar with the language. How did the initial learning curve affect productivity for instance?
I'll read your article first, thanks!
m

mikehearn

01/26/2017, 11:08 AM
You're welcome!
m

mk

01/26/2017, 11:14 AM
Not in scope of this topic, but interesting to hear as well that you've adopted a functional style in Kotlin. I'm exploring this myself and have started to port cats from Scala to Kotlin. (cats is the spiritual successor to scalaz in a sense.) I'd actually be interested in getting feedback around this at some point if you think you're interested in it (it's undocumented still but I'm planning on spending more time on it soon)
It's not as elegant as cats because Kotlin's type system isn't as strong as Scala's, but it affords with much of the same utility around being able to express effects in the type system
Sorry back on topic:
A risk with using obscure languages is that they might not stick around
This is a concern that came up here as well, but more so because that there was some anxiety around Kotlin not being endorsed by Google in any major way, and the chance that support might dwindle further because Google might be pushing e.g. Dart or other languages in the future
But maybe it was being overly defensive
We drew a lot of comparisons to Apple and Swift, where Apple is heavily pushing its own language
Good read, thanks again.
m

mikehearn

01/26/2017, 11:28 AM
Well, Kotlin wasn't actually designed for Android. It happens to have picked up steam there, but originally Kotlin was designed for JetBrains' own apps i.e. desktop apps.
So if Google ignores it, that doesn't change much about the original value calculation. It was never a bet on getting Google's support. I worked for Google for nearly 8 years and understand the internal culture there quite well: I would not expect Google to ever formally endorse a technology they haven't built themselves unless they have no real choice.
But if developers end up picking up Kotlin anyway, then I doubt they'll make a fuss about it either. They don't have a language that can credibly compete with Kotlin. Go and Dart are rather not helpful to Android devs.
WRT functional style, what I meant by that is that we pretty frequently write calculations as chains of maps/filters/folds/groupBys/etc, and there are very few mutable objects in our codebase. Stuff like cats and scalaz is a whole other level. I admit to being somewhat skeptical of scalaz at least: I'm not a huge fan of library code that liberally uses untypeable unicode characters in its source 😞 that seems to indicate a worryingly low interest in practicality. I don't know much about cats, and obviously I'll give you some pinches of salt for free here, as I haven't written any code that uses scalaz or cats
Outside of defining DSLs with interpreters, I've kept a lid on Haskell-style code in our codebase. Unfortunately many of the bank devs that turn up on our doorstep are frequently flummoxed even by things like generics, so we have to keep the API we expose as simple as possible. Just using something that isn't Java at all is pushing it 😞
m

mk

01/26/2017, 11:36 AM
This all sounds sensible--thanks. By the way:
I'm not a huge fan of library code that liberally uses untypeable unicode characters in its source
I completely agree--fortunately, the cats authors understood that this is a major pain point for newcomers to the librarie(s) and made all the crazy squiggly arrows and Haskell style combinator symbols optional. We use cats quite heavily in our backend services, and we use none of these symbols.
so, you don't have to resort to
\/
to say you want an
Either
🙂
I also didn't adopt any of that in my Kotlin port
m

mikehearn

01/26/2017, 11:37 AM
That sounds like progress, indeed!
well, let us know when the port is available, I'll be interested in checking it out!
m

mk

01/26/2017, 11:40 AM
Cool! It's sort of available, but there's no documentation. I will work on that 🙂 Until then feel free to poke around here: https://github.com/mttkay/kats