Live data from Hacker News

Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

news.ycombinator.com

201–203 of 203 posts

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#201

Earlier quoted context omitted.

For tests : I have had some nice experience writing jUnit tests with pitest (PIT) : there is a gradle plugin to do that in AS/Idea The only issue I had was to ignore Package class to make pit work For DI, Dagger2 works fine with kotlin For multithreading : Quasar supports Kotlin (I'm waiting for quasar to support android though)

Can you use PIT with Kotlin? Really tempted to try it out but wasn't sure. I suppose if it works at the bytecode instead of source level it would just work.

Yes you can (I managed it and it works beautifully). But you have to make it ignore Package Class at the moment because top functions in a package (say my.great.pack) can be in different .kt files and are gathered in a single class (my.great.pack.PackPackage) and pit doesn't seem to be able to cope with a class whose source come from more than 1 file (or I missed something).

Just put something like this in your gradle.build file :

apply plugin: "info.solidsoft.pitest"

pitest { targetClasses = ['org.lakedaemon.suggest.', 'org.lakedaemon.compress.'] //by default "${project.group}." excludedClasses = ['org.lakedaemon.compress.decoders.DecodersPackage', 'org.lakedaemon.compress.decoders.EncodersPackage'] avoidCallsTo = ['org.apache.log4j.', 'org.lakedaemon.L.', 'org.slf4j.', 'java.util.logging.'] pitestVersion = "1.1.4" //not needed when a default PIT version should be used threads = 4 outputFormats = ['XML', 'HTML'] enableDefaultIncrementalAnalysis = true testSourceSets = [sourceSets.test/, sourceSets.integrationTest/] mainSourceSets = [sourceSets.main/, sourceSets.additionalMain*/] }

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#202

Earlier quoted context omitted.

For tests : I have had some nice experience writing jUnit tests with pitest (PIT) : there is a gradle plugin to do that in AS/Idea The only issue I had was to ignore Package class to make pit work For DI, Dagger2 works fine with kotlin For multithreading : Quasar supports Kotlin (I'm waiting for quasar to support android though)

> For multithreading : Quasar supports Kotlin (I'm waiting for quasar to support android though) Have you opened up an issue on Quasar's repo ( https://github.com/puniverse/quasar ) so Parallel Universe can track this for a possible milestone?

We don't need to : I read somewhere that it was on their roadmap...

Re: Ask HN: Has anyone here programmed in Kotlin? What do you think about it?

#203

I tried Kotlin ~2 years ago and generally liked it. However, one thing that I missed is the possibility to generate Javadoc besides KDoc. This would be useful when writing a library in Kotlin to Java developers who are 'not in the know'. Any idea if this is possible now?

Actually this is being worked on right now: https://github.com/orangy/dokka/pull/32
Post reply on HN