When should I make property functions?

Trent Caprico email at example.com
Mon Nov 19 20:11:11 UTC 2018


In Java, it is considered best to always make all member 
variables private, and make getters/setters for the 'public' 
members.

In D, should I create @property functions for all 'public' fields 
when I first define the class, or is it best to wait until a 
property function is actually needed?


More information about the Digitalmars-d mailing list