Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I understood article saying that implicit invariants are like undocumented choices.

If I have blog where blogposts have maximum length of 4096 bytes. But why would there be such limit, is it creative decision? is there technical limitation? was it just some "good enough" number when blog was created?

I don't think type systems really can encode these reasons. You see the constraints but not the reasoning.



    type BlogPostThatFitsInSMS = BlogPost<FixedString<150>>
No one would write this type in the real world (and most type systems can’t encode it), but you see lower-level sorts of reasoning all over the place in type systems.




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

Search: