Macromolecular compounds obtained by reactions forming a carboxylic ester link in the main chain of the macromolecule