There are prohibitions where I work against eating in any room with computer equipment. Personally, I don't mind students sucking on a sweet (candy) or chewing gum. I do mind if they eat a nosier food, such as a packet of crisps (chips), as this obviously disrupts the class and the teaching involved. I personally give out food at various occasions as a kind of incentive or as prizes for games etc.
I have been taking college classes lately, and in rooms where computers are predominant, eating and drinking is absolutely forbidden. Spilling drinks on keyboards cost money that most schools--even colleges--can't afford. I personally have no problem with kids eating in classrooms, but my experience from teaching middle school reminds me that (a) most kids will NOT throw away the inedible wrappers and baggies, leaving them for teachers and janitors to clean; and (b) many kids will take advantage of the opportunity, making noise while eating, throwing food, etc. With 5 minute breaks between most classes in addition to lunch time and recesses, kids have plenty of opportunity to eat. In a perfect world, banning food in classrooms would be ridiculous but, sadly, the kids who abuse the privilege are the reason that many schools (and/or teachers) refuse to allow eating in the classroom.
My classroom has tile floors, so I allow eating as long as students don't make messes of any kind and don't leave their wrappers, bottles, etc. in my room. This is especially true for my first period students who ride the bus since they have no other ride (no car of their own, live way out in the country, etc.) to school and who are on the breakfast program at school. Oftentimes they get to school just minutes before the bell, so they either don't eat (if not allowed to bring it to the classroom) or they eat in the room. I haven't had any trouble, and very often, if a student leaves items behind, another student will clean it up as my policy is "I am not your momma. Clean up your mess or all privileges will be suspended."
The time and place for food is generally not a classroom where serious instruction needs to happen. I always reserved and "food moments" as rewards or celebrations after some accomplishment. If there is no purpose, there is no food, as it is one of the worst distractions possible in a classroom. It is something which appeals to many senses, so I use it sparingly as a motivator.
I generally have no problem with it, but I have a discussion with my students about not abusing the privilege. Many of my students have a "zero hour" class before school such as physical conditioning, while others get breakfast at school, and may not have a chance to eat before class starts.
I also teach Seniors first period, and usually they can be a little more responsible when it comes to handling food in the classroom. I do keep it from becoming a smorgasbord though and talk to students who are distracting.