tjfbirch (23) [Avatar] Offline
#1
Will the book cover deploying Kotlin programs? Also, will it cover any details specific to developing in Kotlin in any of the IDEs?
Dmitry Jemerov (39) [Avatar] Offline
#2
The deployment of a Kotlin program is no different from deploying a Java program to the same environment; the details of how this is done depend much more on the environment where you need to deploy it than on the fact that the program is written in Kotlin. Because of that, it doesn't seem to be feasible to cover the deployment information in this book.

For IDE usage, a book is not the best medium to convey the information. Instead, we plan to publish screencasts to https://kotlinlang.org/ and the JetBrains YouTube channel demonstrating Kotlin support in IntelliJ IDEA.
Anonymous (122) [Avatar]
#3
Error in 'when' statement example
Hi,
I found an error in the example:
fun mixOptimized(c1: Color, c2: Color) =
when {
c1 == RED && c2 == YELLOW, c1 == YELLOW && c2 == RED ->
ORANGE ...

because when is without an argument the IDE is not recognizing the RED, ORANGE and other colors.
In this case it should look like:
fun mixOptimized(c1: Color, c2: Color) =
when {
c1 == Color.RED && c2 == Color.YELLOW, c1 == Color.YELLOW && c2 == Color.RED ->
Color.ORANGE
Anonymous (122) [Avatar]
#4
Error in 'when' statement example
Anonymous wrote:Hi,
I found an error in the example:
fun mixOptimized(c1: Color, c2: Color) =
when {
c1 == RED && c2 == YELLOW, c1 == YELLOW && c2 == RED ->
ORANGE ...

because when is without an argument the IDE is not recognizing the RED, ORANGE and other colors.
In this case it should look like:
fun mixOptimized(c1: Color, c2: Color) =
when {
c1 == Color.RED && c2 == Color.YELLOW, c1 == Color.YELLOW && c2 == Color.RED ->
Color.ORANGE


I was wrong - using color names directly is not working in all 'when' examples (with colors in Kotlin M14 and IntelliJ IDEA 15)
Anonymous (122) [Avatar]
#5
The 'when' example has already been corrected, and the correct version will be included in the next MEAP update. Sorry for the confusion.
Joey (14) [Avatar] Offline
#6
Is this book only for experienced Java devs? Will it work for C# devs too?
Dan Maharry (13) [Avatar] Offline
#7
It's aimed squarely at Java devs who may want to use Kotlin as a superset of Java, but C# devs should be able to follow it as well. The language mechanisms are all the same although Kotlin fills in some Java features that C# already has smilie