kevinmost
11/29/2017, 7:45 PMvoid
or Void
, it uses Unit
. You want logic: (g: Graphics) -> Unit
jamie-purchase
11/29/2017, 7:47 PMShawn
11/29/2017, 7:48 PMUnit
, it can’t return anythingnull
, then that’s not returning Unit
jamie-purchase
11/29/2017, 7:50 PMUnit
is - i've caught up now
This type corresponds to the void type in Java.https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html
kevinmost
11/29/2017, 7:51 PMUnit
is a Kotlin object so it's a singleton, and only one exists. Kotlin implicitly does return Unit
similar to how Java does for void
null
is not of the type Unit
. Unit
is a non-nullable type so null
does not fit in therejamie-purchase
11/29/2017, 7:52 PMUnit
Shawn
11/29/2017, 7:53 PMjamie-purchase
11/29/2017, 7:56 PMShawn
11/29/2017, 7:57 PMjamie-purchase
11/29/2017, 7:57 PMmadorb
11/29/2017, 8:13 PMjamie-purchase
11/29/2017, 8:59 PMvar buffer = createObject("java", "java.lang.StringBuffer");
to dip into java classes and use them in cfml
the language is still miserably behind most modern developments but thanks to the lucee.org (open source cfml engine) and https://www.ortussolutions.com/products/commandbox (CLI and package management) we are slowly getting there
there is support for lambas but buggy, static modifiers and generics are still nonexistent