C Immutable object design pattern