Constraints and quantization