Hacker News new | past | comments | ask | show | jobs | submit login

Yes to the principle. But typed dict is useful for more than just "the wire".

There are places where you just dont need the overhead of a class. Yes slotted classes make this much cheaper but so do named tuples.

If the behavior of a thing is to map values then it should stay a dict.

If the behavior is a bag of attributes then yes pick something better.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: