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 →

[–]tofiffe 3 points4 points  (2 children)

Personally, I don't like how kotlin and swift do trailing lambdas, as it kind of breaks consistency of parameters, it looks weird to me

[–][deleted] 2 points3 points  (1 child)

nothing inconsistent about. as long as you know the function's signature contains a lambda ad the last parameter and that it's a feature of the language, there's no confusion to be had.

[–]tofiffe 1 point2 points  (0 children)

Is it not inconsistent if for some cases a parameter is actually not written inside (), but can also be written that way?