24 ms·
Python is the least-worst general purpose imperative not-performance-critical OO scripting language. It has lots of problems (weird scoping, community issues, r
by basketcasing 11y ago
Python is the least-worst general purpose imperative not-performance-critical OO scripting language. It has lots of problems (weird scoping, community issues, roundabout docs, `''.join()`, crippled lambda, no variable declarations, some lousy naming, module distribution issues, yet more ways to do string formatting, whitespace-sensitive syntax instead of curlies+semis), but the alternatives have worse problems, so Python is at the top of the heap for its type of language.
I think Python could easily be replaced --- for greenfield projects --- by something better, but there's nothing better right now, and more and more people will keep using Python for that very reason.
- aldanor 11y agoWhat's wrong with `''.join()`? It's fine as is, I think, same logic as '{}'.format().
- basketcasing 11y agoRe. join, I think Perl got that one right: `join(glue, pieces)`. `','.join(pieces)` just seems unnecessarily weird, and present simply for OO's sake. Not everything needs to be some object's method.
- aldanor 11y agoYes but then you can map things more easily without having to create partials, and it's consistent with how all other methods work in Python (e.g. format method) >>> phrases = [['a', 'b', 'c'], ['d', 'e']] >>> print(list(map('-'.join, phrases))) ['a-b-c', 'd-e']