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

This seems really badly argued. The second version seems much worse and harder to extend. Looks like classic ORM style database abstraction wrapped with hand written types. This type of code usually leads to inflexible data models and inefficient n+1 query patterns. Relational algebra is inherently more flexible than OOP/ML-style type systems and its usually better to put as little clutter between your code and the db queries as possible in practice.


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

Search: