Also `def` for `fun` :wink:
# language-proposals
r
Also
def
for
fun
😉
👍 1
🧌 2
k
I can't really handle typing
fun
all the time 😞.
😂 2
r
If there was a way to do effect control I'd actually like something like:
Copy code
pure fun x(): Int = 0 //compiles

pure fun y(): Int { 
  println("boom!")
  return 1
} //does not compile because `println` is an effect.

pure fun z(): () -> Int = {
  println("boom!")
  0
} // compiles because the effect is controled by a function
k
That's actually a cool idea, why do you put that in this thread?
👍 1
r
I'll put it in the channel
r
I don't think there is any way for that to work with platform interop
r
yeah, I'm sure there is a lot of issues to work around to be able to implement something like this.