Re:Don't Be Clever
by fuzzy2 on Thursday August 03, 2023 @10:54AM
(#36986798)
This is sometimes also called scaffolding, which I think is a better term. Code generation often means (compile-time or otherwise) generation of code from something else (like .proto definitions). Code that is not supposed to be modified by the developer and will be overwritten automatically.
[ Parent
| on HN ]
I've also seen "scaffolding" used to generate code that shouldn't be manually modified.
E.g.: https://learn.microsoft.com/en-us/ef/core/managing-schemas/s...
That's someone who doesn't know what words mean.
When a building is built, the scaffolding isn't an immutable part of the final product.
Re:Don't Be Clever
by tomjakubowski on Thursday August 03, 2023 @12:47PM
(#36988319)
Well if we're being anal about the metaphor, in construction and renovation, the scaffolding eventually goes away. Scaffolded code rarely disappears entirely; some of it usually sticks around.
To be perhaps even more anal, after construction scaffolding is taken down, stored, transported to a new project and then used again.
And it's made of steel, not bits.
If there are no bits then what're all the pieces linked to?
Re:Don't Be Clever
by paulddraper on Thursday August 03, 2023 @02:36PM
(#36989860)
Then that makes it an inappropriate word for both uses.
* * *
It’s a little ambiguous with Entity Framework. There is no rule that says you cannot change the resulting code. If you want to continue with Code First, that is a totally valid approach, there’s even a subsection on that.