evkaky
02/07/2018, 5:55 PMT variable = default(T)
in the C#
My first try in kotlin:
data class Node<K>(val key: K)
class Container<K> {
var head = Node<K>() // err here, I have to specify *key* prop in the node ctor, but how?
}
What can I use?Andreas Sinz
02/07/2018, 10:53 PMint x;
is fine, but in kotlin you have to intialize everything before using it, makes it obvious to the reader what value x
hasevkaky
02/08/2018, 9:36 AM