News for hackers. Stuff that matters.
Re:The case against Kotlin by xiaoma on Saturday July 29, 2017 @05:48PM (#14883157)
>"Developers need to learn Kotlin well enough to confidently read the language. While a few developers will self-teach themselves, teams will still need to set aside training time for everyone to get up to speed. New developers will need to learn Kotlin, and a one and done training won’t be enough. In addition, current developers who are trained but rarely touch Kotlin may need a refresher if they move to a part of the code requiring Kotlin. This means onboarding is slower and you may lose some velocity."

Are engineering teams at Pinterest really so weak that going from Java to Kotlin—an extremely similar language—is a major hurdle? The entire mindset of this article is alien to me.

Re:The case against Kotlin by ryanator on Saturday July 29, 2017 @07:19PM (#14883496)
Hi, I wrote this article.

Some context I think might not have made it to the Hacker News readers. We use Kotlin at Pinterest, we were one of the two teams talking about the value of Kotlin when google announced support at IO https://www.youtube.com/watch?v=fPzxfeDJDzY.

The article is meant to show the reasons we considered not to use it. The language is very similar to Java and we've written some about how even "the grumpy java developer" can learn it https://medium.com/@Pinterest_Engineering/kotlin-for-grumpy-....

We don't expect to be able to hire Android engineers that are familiar with Kotlin to the level of expertise we expect with Java. We do expect everyone to be able to work with any part of the Android code base and not be guessing at how of the concepts many android devs aren't familiar with work. If you don't consider the time for engineers to learn this, you are not considering some of the cost of adopting. If you think it's not that big of a deal, then go for it, we did.

Re:The case against Kotlin by sitkack on Sunday July 30, 2017 @02:46PM (#14887242)
Java itself is pretty big language. Each framework effectively forks it and makes another dialect, so the term is pretty loaded. Dropwizard, Spring, Guava, are all their own in thing in addition to Java. Then one has to learn to the domain and the codebase. Language itself is just a small portion of solving the problem.
Re:The case against Kotlin by strictfp on Saturday July 29, 2017 @06:37PM (#14883310)
I'm a lone wolf in the Java space, and I must say that this one really hits home. I've been dealing with so many Java devs who are unwilling to approach anything else that I am sick and tired of their whining! These people are even moaning about JavaScript. I mean - Come On! (Job style)
Re:The case against Kotlin by sidlls on Saturday July 29, 2017 @07:05PM (#14883435)
I primarily use Python, C++ and Rust these days and I would certainly moan about having to pick up JavaScript.
Re:The case against Kotlin by celim307 on Saturday July 29, 2017 @07:54PM (#14883611)
When have you used it last? The ecosystem around it sucks but the language itself is not too bad, es6 has made the syntax pretty bearable
Re:The case against Kotlin by harrygeez on Sunday July 30, 2017 @12:44AM (#14884472)
I just started using it recently and while writing in Babel/ES6 is nice, figuring out which framework or libraries to use (React vs Web Components and React vs Vue vs Polymer vs Angular vs...), sass or less, to redux or not, setting up webpack is definitely not an enjoyable experience. The beauty of many other languages is it doesn't usually involve so many decisions. There's usually an undisputed better library, a recommended setup, but js ecosystem now has so many options that it only leads to decision fatigue.
Re:The case against Kotlin by bsder on Saturday July 29, 2017 @10:31PM (#14884091)
> The ecosystem around it sucks but the language itself is not too bad

The problem is that the ecosystem is what matters nowadays. A language can suck donkey balls and win as long as it has a robust ecosystem (see: VB6, PHP, etc.)

Python and Rust have phenomenal ecosystems. I have no clue about the C++ ecosystem nowadays.

Re:The case against Kotlin by fulafel on Sunday July 30, 2017 @03:06AM (#14884797)
The semantics is the major pain point. It doesn't flag many errors. Python is a much easier language to dev/debug in because of this. Also, if you're going to transpile, why not transpile from a nicer language? ES6 is competing with ClojureScript/TypeScript/etc.
Re:The case against Kotlin by srean on Sunday July 30, 2017 @03:38AM (#14884894)
Is the 'transpile' nonsense a java script community thing ?
Re:The case against Kotlin by shakna on Sunday July 30, 2017 @12:00PM (#14886497)
Transcompile is very old term in computing, at least the 80s, specifically referring to compiling from one language, to another high level language.

CoffeeScript simply made the shortened term more popular, but the use of a more specific term is nothing to get irritated about.

Re:The case against Kotlin by fulafel on Monday July 31, 2017 @09:35AM (#14891777)
True, but transcompiling hasn't been a very commonly used term for that so it's not an obvious term to use. For example, the early C++ compiler that targeted C was not referred to as a transcompiler. Nor was the popular f2c fortran-to-c compiler.
Re:The case against Kotlin by fulafel on Sunday July 30, 2017 @03:48AM (#14884914)
Yes, I guess "compiler" confused too many developers who thought it implied native code.
Re:The case against Kotlin by abiox on Sunday July 30, 2017 @07:59PM (#14888584)
"transpiler" is a subset of "compiler".
Re:The case against Kotlin by abiox on Saturday July 29, 2017 @08:37PM (#14883779)
undefined is not a function!
Re:The case against Kotlin by jackmott on Saturday July 29, 2017 @08:16PM (#14883700)
ugh
Re:The case against Kotlin by sitkack on Saturday July 29, 2017 @07:19PM (#14883493)
Funnily enough, the list of complaints was almost a perfect mirror of C++ dev complaining about Rust.
Re:The case against Kotlin by sidlls on Saturday July 29, 2017 @08:22PM (#14883732)
That doesn't even make sense. There is absolutely no parallel in going from Java to JavaScript with going from C++ to Rust.
Re:The case against Kotlin by Stratoscope on Saturday July 29, 2017 @06:50PM (#14883370)
It's not just Java either. I worked with one OSX/iOS dev who knew Objective-C inside and out, but knew no other languages and didn't want to learn any others, because after all you can do anything in Objective-C.

I asked him what he used if he just wanted to write a quick little script. "Objective-C."

There's something to be said for his kind of mastery of a single language, but it was different from the multilingual culture I'm used to.

I wonder if he's using Swift now...

Re:The case against Kotlin by cprayingmantis on Sunday July 30, 2017 @02:13PM (#14887107)
Wow this really makes me grateful for the team I work on. This past 4 months we had to build some stuff that was off of our usual platform using Python and none of us had any real world experience with python, but we all buckled down and became quite proficient. None of us really complained (ok we did complain some about the import system but other than that we were good) and we were able ship a great first pass at the problem quickly. I guess curmudgeon devs are just curmudgeon devs.
Re:The case against Kotlin by dajohnson89 on Saturday July 29, 2017 @06:53PM (#14883390)
Are Javascript and Java really that similar? I know plenty of front-end Javascript devs who are pretty uncomfortable with Java development.
Re:The case against Kotlin by jogjayr on Saturday July 29, 2017 @09:03PM (#14883846)
Most of the code I've written in my career is JS/TS, with Java and Python probably tied for second. I'll admit to not liking Java but it's got nothing to do with not wanting to learn a new language. Most Java code is extremely verbose, with tons of boilerplate for doing simple things, like copying props from one object to another.
Re:The case against Kotlin by Guthur on Saturday July 29, 2017 @07:08PM (#14883443)
Other than some syntax similarity, no
Re:The case against Kotlin by neonhomer on Saturday July 29, 2017 @06:50PM (#14883376)
I upvoted you solely on the "Come On!"
Re:The case against Kotlin by blub on Sunday July 30, 2017 @04:51AM (#14885060)
There's a certain type of developer that's impossible to miss on developer-focused social media: the thrill-seeker which loves learning new programming languages, building an apparently impressive-looking project with them and writing blog posts about how everything was awesome.

Introducing a new language to an organisation is completely different from the above and it's nice for a change to see blog posts that also consider the long-term sustainability of a solution, maintenance costs, potential staffing and training difficulties, etc. These are things that are very important for a mature project.

Re:The case against Kotlin by ramensea on Saturday July 29, 2017 @06:36PM (#14883307)
It might be their size. I can say as a small team, the transition was seamless.
Re:The case against Kotlin by nicholassmith on Saturday July 29, 2017 @07:24PM (#14883514)
Going from Java to Kotlin does have a penalty of learning, same as going from C to C++. I think going to Java to Kotlin is easier if you have Swift or Go as language experiences.
Re:The case against Kotlin by orclev on Sunday July 30, 2017 @02:29AM (#14884680)
The jump from Java to Kotlin is a lot less than the jump from C to C++. 75% of Kotlin is just syntactic sugar for things you are already familiar with in Java (things like defaulting to public access), so those are really easy to wrap your head around, and the remaining stuff isn't that far removed from what you're used to. Going from C to C++ on the other hand is introducing OO concepts, and then there's the STL which is basically an entire second functional language on top of C++.
Re:The case against Kotlin by aembleton on Saturday July 29, 2017 @06:02PM (#14883198)
I wonder if they make use of any other languages for other tools such as Spock, or if they get rejected because they are different.