Varun Ramesh's Blog

#scala


Automatically Promoting Constructor Parameters to Fields

March 30th

When writing object-oriented code, you frequently want a constructor that takes in values and assigns them to object fields. Some languages reduce the repetition required for this.