Having a quick bite to eat while you are walking or going someplace is ok, but make sure its not too messy. Burritos explode, falafels drip, coffee spills, and sandwiches fall apart. Make sure you have a good handle and extra napkins.
Out of courtesy for others, do not eat smelly foods in tight public spaces like the trains or leave garbage behind.