How should this realised in restaurants?
It would only work, if the restaurant engage a laboratory to analyse the meal. This would destroy a whole business, because it is quiet expensive. I know this, because i am myself business owner and had to engage several times a laboratory in the past 6 years.
Hey :) There's no need to have a laboratory to know how many calories, carbs, fats, and hydrocarbonates the food contains that you provide to your customers :) Businesses know what they use to make their products, so customers have a right to know what they are paying for and consuming. For instance, as a customer, I have a right to know that a business is using palm oil, for example, in its products, so I can decide whether I want to buy it or not.
Just to elaborate: Have the chef weigh all the ingredients once, and then do a bit of math. For example, if you're using 10ml of oil and 100g of flour, take the nutritional information that is provided on the ingredients and add them up. It may not be perfect, but with prepared food, it never is, and I'm sure everyone will be aware of this. But it's still very helpful to know a rough estimate. "Does this meal have around 700 kcal or around 2000 kcal" would go a long way with helping people on a diet, for example. And especially for people with allergies it's very important to know if some of the ingredients contain peanuts, for example.