Re:Porting 4.5K lines of C to Go
by taspeotis on Saturday August 05, 2017 @12:11AM
(#14934178)
> Instead of a field, you get a field and two methods
And if you wanted a publically read-only/privately mutable value without properties you'd have to write ... a field and one method. Possibly two methods if you wanted some shared validation code everywhere you assign the field.
Like I said, in practice, it's the same. If you have some case where three vs. two members makes a difference you're in pathological case territory.
And if you wanted a publically read-only/privately mutable value without properties you'd have to write ... a field and one method. Possibly two methods if you wanted some shared validation code everywhere you assign the field.
Like I said, in practice, it's the same. If you have some case where three vs. two members makes a difference you're in pathological case territory.