Why is there no piecewise tuple construction?

Question: Why doesn’t the same piecewise constructibility exist for arrays and tuples? My recollection is that piecewise construction was added to std::pair for one reason only: to support uses-allocator construction of the pair elements, i.e. to allow an allocator to be provided and conditionally passed to the elements if they support construction with an allocator … Read more

Is there a name for this tuple-creation idiom?

I think this is a subtle implementation of a Monad-like thing, specifically something in the same spirit of the continuation monad. Monads are a functional programming construction used to simulate state between different steps of a computation (Remember that a functional language is stateless). What a monad does is to chain different functions, creating a … Read more

Why can’t I use a list as a dict key in python? Exactly what can and cannot be used, and why?

There’s a good article on the topic in the Python wiki: Why Lists Can’t Be Dictionary Keys. As explained there: What would go wrong if Python allowed using lists as keys, say, using their memory location as the hash? It would cause some unexpected behavior. Lists are generally treated as if their value was derived … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)