LastExceed
04/28/2020, 11:22 AMval x = ::main
instead of just
val x = main
to store a function in a variable?arekolek
04/28/2020, 11:53 AMmain
could be a property, so main
would execute its getter
but I'm no expert 😛LastExceed
04/28/2020, 12:39 PMmain
is a function, not a propertyMike
04/28/2020, 1:00 PM::main
. If there is no function called main
, then it's wrong.
For `main', again, no confusion. It will look for a property/variable with that name.
If you allow what you propose, it's not clear to others what your intent is, and what happens if you have a fun main
, use main
and someone adds a main
variable/property?
All of a sudden this code doesn't work. If you're lucky, it will be at compile time, but it's just as likely to be at runtime.LastExceed
04/28/2020, 1:02 PMMike
04/28/2020, 1:08 PMarekolek
04/28/2020, 1:15 PMLastExceed
04/28/2020, 1:16 PMLastExceed
04/28/2020, 1:17 PMMike
04/28/2020, 1:23 PMDerek Peirce
04/29/2020, 5:54 AM