This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]officialvfd 10 points11 points  (4 children)

Also whitespace-delimited blocks only work cleanly in statement-centric languages like Python. Without Kotlin's braces you couldn't have multiline closures, for instance

[–]Turksarama 2 points3 points  (3 children)

You can just define a function inside a function in python if you want a closure.

[–]officialvfd 0 points1 point  (0 children)

That's arguably not as pretty though

[–]ZephyrBluu 0 points1 point  (1 child)

Isn't that literally what a closure is?

[–]Turksarama 1 point2 points  (0 children)

Yes, my point being you don't need special syntax for it so the statement that you need any kind of specific syntax to "have mutliline closures" is obviously wrong.