News for hackers. Stuff that matters.
Re:Don't let dicts spoil your code (2020) by b3morales on Sunday June 26, 2022 @01:19PM (#31885819)
> Classes aren't a great abstraction when enforcing program invariants like "this object must at least have fields a and b."

Can you elaborate on the functional difference between

- an enhanced dictionary where certain keys are guaranteed as part of the type, and

- a record type (class, struct, whatever) with named fields?

There are no comments on this comment yet.