Hacker News new | ask | show | jobs
by _y5hn 2047 days ago
In order to produce code with some agility, it is best to keep data private, adhere to SOLID and have serious thoughts about what complexities you need to introduce when.

I don't see any actual need for properties, when the same effects apart from syntactic sugar can be had using methods, but one really shouldn't.

The idea being not to optimize writing code once, but greater and easier ability to read and change code later.

This puts me in a camp where I don't think it's a great idea to always tie process objects to serialization formats and APIs either. Certainly, layers and MVC would require serious explanation why enforce these structure in code other than theoretical handwaving, ie. what is the value now? Hexagonal and clean architecture? Later, maybe.

Of course, put in front of C# or anything enterpricey, there's no choice but to engage in these things.