Best practices of using const

drug drug2004 at
Wed Feb 20 08:33:09 UTC 2019

On 20.02.2019 11:05, Kagamin wrote:
> On Tuesday, 19 February 2019 at 16:38:17 UTC, drug wrote:
>> The same I can say about properties - for example I use them in meta 
>> programming to detect what to serialize/process - I skip methods but 
>> serialize properties and for me this is a nice language feature.
> Serialization of arbitrary stuff is a bad practice anyway, it was the 
> cause of vulnerabilities in serialization libraries. DTO is the way to go.
serialization is just an example here. But using properties lets me to 
avoid using DTO except really complex cases and lets me decrease 
maintenance cost. In my case (I develop a prototype and very often 
change its data structures) they work really well.

More information about the Digitalmars-d-learn mailing list