Kotlin test drive: N-Queens solver

I recently took Kotlin 1.2 with IDEA for a spin. Here is the Github repository. I look forward to hearing your comments. I’m definitely enjoying Kotlin so far.

As an experienced Java programmer, here are my questions/impressions so far:
(1) val/var are fantastic and cut down redundant type information.
(2) Sometimes, val/var are too concise, however, and explicit
specification of type is beneficial, which IDEA helps with.
(3) No semicolons isn’t good or bad; it really doesn’t matter, IMO.
(4) I still prefer Java’s for-loop construct; it’s more flexible when needed.
(5) I prefer Java’s built-in support for declaring arrays; e.g., int.
(6) Lambdas feel about the same as Java 8. Performance differences?
(7) Null safety is great; I rarely had to think about null checking.
(8) String templates and builder() are fabulous; strings are much easier in Kotlin.
(9) I really wish Kotlin had code blocks w/o just using the run() function.
(10) I love being able to put functions at the top-level of the file, not only in classes.
(11) I like companion objects fine, but I wish classes could also just have static methods.

1 Like