logoalt Hacker News

akkad33yesterday at 5:57 PM2 repliesview on HN

But good data structure is not always evident from the get go. And if your types are too specific it would make future development hard if the specs change. This is what I struggle with


Replies

jpc0today at 4:29 AM

Good strong (read specific) types encourage easier redactors.

Changing the function signature or the type then generated cascade of compiler errors that tells you exactly what you touched.

Weak non specific types does not have that property and even with tests you cannot be sure about the change and cannot even be sure you are upholding invariants

munk-ayesterday at 7:47 PM

Professionally I'm a data architect. Modeling data in a way that is functional, performant and forward facing is not an easy problem so it's perfectly fine to struggle with it. We do our best job with what we've got within reasonable constraints - we can't do anything more than that.

I found that over time my senses have been honed to more quickly identify things that are important to deeply study and plan right now and areas where I can skimp more and fix it later if problems develop. I don't know if there was a short cut to honing those senses that didn't involve a lot of pain as I needed to pick apart and rework oversights.