You know who doesn't work that way? Fabrice Bellard. If you're lucky enough to be his co-worker, you can sit down next to him and ask a question at any time, and he will stop what he's doing and answer you. Then he'll get back to work.
The attitude you expressed above (and it's far from uncommon here on HN) is just an example of developers wanting to be treated like special snowflakes. I do not believe this is a desirable trait for someone working in a company.
Perhaps that is not a desirable trait for someone working in a company.
Also, I submit that if your company is larger than a couple dozen people and there are many questions that cannot be answered by more than one person, then your company has significant compartmentalization problems.
I hate being interrupted, we all do, even working as a cashier in McDonalds. But the idea that a special branch of people SHAN'T be interrupted is snowflake treatment.
I already feel privileged over other employees in my company for having flexible workhours (felt sick yesterday evening, sent a text at 1am and got at work around 2pm today despite a production deployment being scheduled for 5pm), now if suddenly MY time is more important than anyone else's, I'm not an engineer, I'm a snowflake in an ivory tower.
She is one meter to my right, unless I tell her "Sorry I'm trying to think of something give me five minutes", I want her and ANYONE who joins my team to ask me any and all questions, otherwise A) I've done a bad job showing my team they can communicate properly with me B) I've done a bad job managing them because I am slowing them down.
A couple people having the sheer clanging temerity to ask me a question doesn't bother me a bit, and I'm not special. I've learned to work in the kind of comprehensible chunks that allow me to be useful to other people, though, because being a multiplier is vastly more valuable (and pays a lot more) than being an adder.
The thing that most threatens my zone is when the headphones need to come out. The _only_ exception is a simple yes/no, such as, "hey, want a coffee from Starbucks?" Anything bigger, whether a phone call or tap on the shoulder can really kill my session or workday. I'm talking your five minute conversation costing an hour or more of wasted time.
What do I recommend? Message me first and say "hey are you free to chat?"
This is so manifestly out of proportion to the disruption that I would (gently, as I am not unsympathetic, and personally I have no problem with IM, though emails can go to hell because developers generally ignore them) call it the kind of personal problem I'd hope you could work on and improve rather than imposing that on everybody around you who expect generally reasonable parameters of human interaction.