if it is such a solution to such a common problem (both of which i dispute), why do you think it is not alredy in the standard library?