3 ms·
One thing that annoys me about static typing is that most of the CRUD programming I do merely martials data back and forth between the screens and database. Onl
by tabtab 8y ago
One thing that annoys me about static typing is that most of the CRUD programming I do merely martials data back and forth between the screens and database. Only a fraction is processed, or should be processed by the application.
Things like null-ability, base-type, and max length should be supplied by the database and therefore not echoed in source code per the Don't-Repeat-Yourself principle (DRY), unless a custom deviation is necessary.
If the screen validation needs to know such info, it can get a majority of it from the database dynamically. But, our stacks don't typically do this for unknown reasons, and thus we reinvent the field attribute wheel in app code.
I posted a question similar to this on HN recently: https://news.ycombinator.com/item?id=19146439 https://news.ycombinator.com/item?id=19146439