News for hackers. Stuff that matters.
Re:Software Engineering principles to make teams better by joshuamorton on Wednesday June 30, 2021 @03:01PM (#27692281)
Please don't do this, there are far better approaches. Use dataclasses/attrs that are frozen for immutable record types.

(Specifically avoid namedtuples unless you're hoisting a tuple to a real record. Record types also being a weird union with a tuple is...oft confusing)

For immutable basic data types, adopt type annotations and prefer to use sequence/iterable and mapping to direct didn't/list types. These provide statically verifiable immutability and also allow begin to encourage useful async-friendly patterns.

There are no comments on this comment yet.