I'm referring to using
var f = (a) -> code;
Instead of function f(a){ code }
Which are exactly the same.JavaScript (and typescript) prefers them. Is it because of a convention or it really has advantages?
Haskell (and other functional languages) also use them a lot, but I guess in these cases the language is designed around it.
Kotlin, Java and other languages with lambdas doesn't really benefit from them in my opinion. If it's a global variable, a function is just enough and 99% of the times preferred. If it is something local, either inline it or also use a function (Kotlin allows for inlined functions, Java doesn't; and maybe, if you need to capture variables, a local Function variable is the only instance where this is useful, but otherwise please just use a function. * )
Python and other languages with limited or not available lambdas do use functions, and there are rare cases where a lambda would help.
In general, if you are using language X try to use language X's features and best practices. Don't try to program as if you were using language Y, it will only make it more confusing. You can easily see when someone is used to a language and tries to use another without understanding the differences. Going from java to python is a very clear example (classes everywhere! Loops just because!)
* In java, an initialized private Function<> field is 99% of the time useless and worse than just a function. And 99.99% if it is final.