A couple things to discuss here.
First, our taste buds don’t know what “food” is. All they are able to do is send a signal to your brain when they find certain kinds of molecules. Taste buds for sour send their signal when they find acids, for instance. Taste buds for sweet send their signal when they find sugars. But acids and sugars and everything else our taste buds are looking for aren’t only in food; they’re in lots of things. The tongue can’t tell the difference.
Second, our tongue and taste buds didn’t only evolve to tell us what to eat, but also what *not* to eat. The taste we call “bitter” responds to certain alkaloids, which are commonly present in poisons. We can taste them in order to know that we *shouldnt’t* eat the thing.
Your tounge tastes the substance. You stomach digests it. The two are not related. There’s no reason to think that your tounge shouldn’t be able to taste something that your stomach can’t digest.
Generally we learn what can be digested and what can’t as they typically taste different. And we associate “nice” tastes with things that can be digested.
Latest Answers