Minecraft has some of this mechanic built in as the benefit from eating sugary foods (cake, pumpkin pie, etc.) is much shorter than eating protein-rich foods. Since players stop healing as they experience hunger there is a real benefit to having better foods to eat.