23 karma · joined August 25, 2017
Anything can panic in Go. Go gives absolutely no guarantee something cannot panic. Errors as values are just a convention. So exceptions are a curse but Go has an inferior exception system, panics, but they are still exceptions.
The solution is checked exceptions.
It's like saying all data should be declared as variable, in the functional programming paradigm, functions are data. That's why closures are useful. And it has absolutely nothing to do with unit-testing, that's beside the point. Javascript is not harder to unit test because it has fully featured anonymous functions.
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.