Consider this simple example:
<cut>
after some time, could be months or years, someone decides to add a field to TREC_1, like this:
<cut>
now there is a naming conflict with SomeOtherField. Where is the conflict resolved, in the new TREC_1 or in TComposed ? The potential for this problem grows as the number of unnamed embedded records grows in the composed record(s).
<cut>
Did that clarify the situation ?
No. I get what you're pointing at, but it only matters in one specific case:
if you assume coders are stupid. Are they?
The error is:
Error: Duplicate identifier "SOMEOTHERFIELD" from composition - already present in the surrounding record(screenshot attached)
That's verbose enough to tell exactly what's wrong, where it came from, and what to fix. No archaeology required, no scrolling through "hundreds of lines or different files" to find the conflict - the compiler hands the answer over on the first build after the change. The maintainer reads "duplicate identifier from composition" and knows immediately what to do.
Yes, the surface for this grows with each anonymous embed. But the surface for any failure mode grows with each new line of code. What matters is whether the failure is
silent (bad) or
loud (good). This one is loud, the message is informative, and the fix is local.
Where you see a "can of worms", a "house of cards" and a "poison pill", I see great potential. Real use cases - I actually can't wait until it's merged into main, so I can start building projects with it. This feature gives real "record-freedom" - not just the
embed, but the feature as a whole. Freedom - that is what I see, and feel.
I really see no value in that feature but only problems.
I've wanted something like this since @Warfley presented his "Record Composition" - his implementation has the same exact thing, anonymous embed, just named differently. You don't see the value, but I (and I hope others) do. This feature was my little dream.
I've said enough about how "free" I feel having it - as a whole, not just
embed on its own. It's a massive addition - it enables really cool structures, like ones with a common header/footer.
But I can see I won't convince you - oh well, I'm not going to keep fighting this. Your preference, fair enough. The feature isn't for you, you don't have to use it, you don't have to test it.
I hope someone else will. Maybe they'll find a bug, maybe suggest an improvement, maybe spot something I missed. As I wrote earlier -
I expect bugs. Or maybe there are none. Or maybe they'll surface over time. Or I'll find them myself.
Let's end this little
embed war here. Give it a few days, then I'll merge to main and we can move on to other changes/fixes. I hope you won't drop Unleashed over this - records still work exactly as before, this is just an addition. You don't have to use it.
Update on the installer timeline: I'll publish it tomorrow, not today. Too late in the day for that, and this discussion took too much of my energy
