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.
> > > Traditional hash tables are imperative data structures, and Lisp code (or Scheme code, at least) typically does not use them because of this. Association lists, which can be represented as literals, are persistent and {snip}
> > I don't understand that.
> Introducing state into programs makes them harder to reason about, thus Scheme programmers generally discourage the use of mutable data structures when a persistent data structure would have worked.
Oh, maybe you typoed and meant to say that traditional hashtables are mutable data structures? In that case, I see what you mean; in Clojure, hashmaps, vectors, sets, and lists are all immutable and persistent. In Scheme, which data structures are persistent, or mutable/immutable?
> The way alists are used, only the first pair to contain the desired key is considered.
Ok, I see now. The function creates a hashmap from an alist.
> I learned that people reach for mutable hash tables far too frequently when there are better options available.
{raises hand} They're very easy to work with. In Clojure, I found myself doing extra work to work around the immutability. I'm sure it's a benefit for larger and multithreaded programs, but mine were neither.
> What languages even have literal syntax for sets? I can't think of any, but I'd like to know.
Clojure and Python. I suppose I could live without literal set syntax, but hashmap/hashtable syntax is extremely handy.
> Traditional hash tables are imperative data structures, and Lisp code (or Scheme code, at least) typically does not use them because of this.
I don't understand that.
> Association lists, which can be represented as literals, are persistent and provider faster lookup, despite being {snip}
Those look like like they could be useful, but I don't see how they can replace hashmaps --- for one thing, they allow duplicate "keys" (the first element of each pair).
I'd use a lisp, and don't mind the lisp/parens syntax, but to be useful for me it must provide easy access to and use of hashmaps and sets.
The one thing that keeps me away from Lisp/Scheme is the lack of built-in syntax for hashmaps and sets (I like Clojure's syntax, but don't want the JVM).
I've never gotten the hang of car/cdr and dotted pairs.
`','.join(pieces)` just seems unnecessarily weird, and present simply for OO's sake. Not everything needs to be some object's method.