4 ms·
I completely agree. I think it's ocd thing. Programmers turn to ORMs because they appear elegant as it gets rid of string manipulation. You need a higher level
by fckgnad 4y ago
I completely agree. I think it's ocd thing. Programmers turn to ORMs because they appear elegant as it gets rid of string manipulation.
You need a higher level perspective shift to realize that the orm is actually the uglier abstraction then just using plain strings.
- arrow7000 4y agoIt's also because having your SQL just be a plain string means you lose type safety and have to do a bunch of type casting on the results of your query, which may or may not be faithful to the DB's actual model
- fckgnad 4y agoIf you want static checks it needs to be done separately from the main language. What I find is that a good ide or editor is capable of doing this for a string if you tell it what that string is. Static checks are not a reason to create a whole new abstraction over a language. As I said it's a sign that new features are needed as an extension. In terms of type safety for SQL I find certain ides already cover most of this so even a typescript style extension on top of SQL is not needed.