I believe this post is a response to my 'why Prisma code generation sucks?' So here we go again.
To understand why Prisma code generation is unfavorable compared to common cases of code generation, I think the best analogy is: 'If giving birth is more painful than getting kicked in the groin, why don't men ask for a second kick, but women do ask for a second child?'"
Take the example of transpiling TypeScript to JavaScript. We gain type safety without changing how the runtime works, which is a huge benefit. Additionally, we transpile modern JavaScript to ES5 so that the majority of browsers can run our code without problems. We also transpile front-end code like Svelte, JSX, and Vue template syntax because these front-end frameworks allow us to write more maintainable code.
The hassles of code generation like these are bearable because they provide us with great benefits. With a library like Drizzle and Kysely, we can declare schemas using TypeScript without the need to learn an extra language.
However, the value of Prisma code generation is simply not as great compared to other common cases of code generation.
Not all code generation provides equal value; some are simply worse/better. This is analogous to why women are willing to give birth to a second child - because the child itself holds inherent value.
Meanwhile, Prisma code generation is like getting kicked in the groin for nothing but pain: the pain of constantly regenerating code, and the pain of learning a low-reusability language.
We have the choice not to suffer the pain, not to get kicked, and not to invite more problems to solve.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I believe this post is a response to my 'why Prisma code generation sucks?' So here we go again.
To understand why Prisma code generation is unfavorable compared to common cases of code generation, I think the best analogy is: 'If giving birth is more painful than getting kicked in the groin, why don't men ask for a second kick, but women do ask for a second child?'"
Take the example of transpiling TypeScript to JavaScript. We gain type safety without changing how the runtime works, which is a huge benefit. Additionally, we transpile modern JavaScript to ES5 so that the majority of browsers can run our code without problems. We also transpile front-end code like Svelte, JSX, and Vue template syntax because these front-end frameworks allow us to write more maintainable code.
The hassles of code generation like these are bearable because they provide us with great benefits. With a library like Drizzle and Kysely, we can declare schemas using TypeScript without the need to learn an extra language.
However, the value of Prisma code generation is simply not as great compared to other common cases of code generation.
Not all code generation provides equal value; some are simply worse/better. This is analogous to why women are willing to give birth to a second child - because the child itself holds inherent value.
Meanwhile, Prisma code generation is like getting kicked in the groin for nothing but pain: the pain of constantly regenerating code, and the pain of learning a low-reusability language.
We have the choice not to suffer the pain, not to get kicked, and not to invite more problems to solve.