Martin KvL
08/15/2020, 4:42 PMtseisel
08/15/2020, 6:18 PMMartin KvL
08/19/2020, 7:40 AMtseisel
08/19/2020, 9:16 AMconst/readonly
=> val
, let
=> var
, function
=> fun
3. Classes work the same, you could also define getters/setters with get/set
, constructor with constructor
(but Kotlin has shorthand syntaxes)
4. Both access properties of objects with the .
dot notation (foo.bar.baz()
)
5. Both have special syntax to handle `null`: foo?.bar?.baz() ?: "one of foo or bar is null"
6. Both have generics.Martin KvL
08/22/2020, 9:43 AM