|
|
|
|
|
by 9t3h4r3o5w1a4w2
3227 days ago
|
|
Python has lambda but they are one liners. There is no way to do write this in Python: someFunc( _ => {
// this is
// a function
// with multiple lines
})
Having to define a named function to use it as a callback is a pain in the ass.Python has an excellent standard library but the language itself is pretty mediocre IMHO. Classes are an afterthought thus verboses, as so is "functional programming" in Python. JS biggest issue is that it is not strongly typed enough. But ES2015 makes it really pleasant to use. |
|
Typing
Is only one line shorter than There is a case to be made that the second version is more legible and that exposing the function foo makes unit testing it possible. I can understand why people might slightly prefer one or the other, but I honestly can't understand the intensity of opinion around this seemingly very minor syntactic difference.I'm curious what you find verbose about Python classes as:
feels fairly terse to me.