4 ms·
>don't have to have to deal with SQL primitives I believe the root cause is that many programmers do not like string manipulations inside their very own progra
by sam_lowry_ 4y ago
>don't have to have to deal with SQL primitives
I believe the root cause is that many programmers do not like string manipulations inside their very own programming "language", be it Spring Boot or Nodejs /s
- fckgnad 4y agoI 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.