plumarr
I discovered most small businesses that I use through word of month, seeing them while traveling or active search through google or google maps. The ones that I may have discovered through ad where through local physical add such as any box fliers or fliers/posters in other local businesses.
There must be a probable cause : https://www.service-public.fr/particuliers/vosdroits/F14837
There is an option to punish the first aspect while limiting the damage on the second one : the nationalisation of the company, with limited compasation to its shareholder. Strangely it seems to only be done or considered to save "to big to fail" business, such as bank, in time of crisis, not as a tool of law enforcement.
In the building sector you can't build without your design being signed of by an engineering office and the engineer and its office take the responsability for it, both at the criminal and civil level.
If the same rule existed for the software industry, the organisation would adapt itself around it.
Being an european, I would say that the first cause is cultural. Innovation for the sack of innovation isn't particurlaly viewed as positive as in the US. In many circle it's even seen as negative. Same thing for entrepreneurship, as there is a good chunk of people that see Businesses, especialy big ones, as an ennemy.
You can't do that based of the code because the code is limited to its content. How do you track everything that isn't in it ? (requirements, relation with other teams, delivery to customer, customer tickets,...)
But if you are a small shop that build software for other companies, it isn't. You write the software, get a one off paiement and you'll not be able to get more revenue from it in the future outside of a possible maintenance contract. You can't resale it to someone else.
To summarise, the work of many software companies is akind to the work of design office : you do R&D for someone else. The amortization will have to be done by your customer, not by you.
I don't think that it's the case for C# task, which also appear to be an higher level construct.
The cause is Records themselves. Record are immutable on purpose and you want to add a mutation constraint whish will not play nicely.
The proposed constraint will be triggered in this case :
var r = retrieveFromDb(); (value is A)
r = r.with(C) -> throw an exception
But this only work if B is generated by the wither. If I deconstruct the record manually and reconstruct with C manually, it'll work. So this offer no garantee that this transition will never occur.