Ryan Rolnicki
02/19/2022, 2:52 PMephemient
02/19/2022, 3:06 PM->
really bugs me in swift and python (typing); :
is consistently property/function return type in Kotlinephemient
02/19/2022, 3:08 PM:
then we'd have declarations like
val callback: (): Unit
and I think that's worse than ->
just for that caseRyan Rolnicki
02/19/2022, 3:32 PM->
for everything then?ephemient
02/19/2022, 3:46 PM: Type
ephemient
02/19/2022, 3:48 PMclass Child(...) -> Parent
is definitely questionable, and function syntax and class declaration (especially with primary constructor) syntax mirror each otherRyan Rolnicki
02/19/2022, 4:18 PMandylamax
02/20/2022, 1:31 AM:
should still remain for inheritance and type specification for properties and function arguments
->
be used as a return type
Although to be fair, the current syntax is not confusing at all. It is easy to pick it up with very little effortJason5lee
02/21/2022, 10:04 AM: Type
-> code