Perform this search on Google and you will see this question has been asked on many different forums. Peoples' experiences vary, so any time you decide to remove a battery or change it by hot swapping it, you may be taking a risk with your equipment.
To add a little personal experience:
My laptop is unique. A computer wizard put in custom parts to give it the body of an Acer Aspire One netbook, but the guts of a more powerful machine with flash hard drives and 16 Gigs of RAM. The machine is power hungry, and I bought it off a friend who had been using it less than a year around 2013. It has Win7 64bit for the OS. I read a post that when you buy new batteries, you should "condition" them by letting them drain to 30% and then re-charging about 5 times over the first week or so. This is recommended by the site that sells the batteries. I goofed and left it plugged in while changing a battery once, and happily, I suffered no ill effects.
However, reading the many variations in other peoples' experiences with this same topic, I do not feel I can trust the hardware to behave consistently in this regard.
It makes more sense to hibernate, let it completely turn off, and change while not plugged in rather than risk killing a laptop full of all of my hard work just for the convenience of not having to wait through a hibernate and restart cycle. It's not just the money. How much time and work do you lose building up a new system to replace all that is lost should your laptop get fried when no one really knows or can give a definitive answer concerning the risks? I spent a lot of time installing and configuring things on my laptop over its years of ownership. I will upgrade eventually, but it's a lot of work, so I'd rather delay until I have to.
On a final note: If you wanted to approach this scientifically: who would test this? Who has the money to write a report on which laptops can do this and which ones will die? Answer: probably no one, and the few who do have better things to spend their time and money on.
Some of us have succeeded at a hot swap of a laptop battery, but that does not mean you will. If you must do this, you do so at your own risk. Unfortunately, that is probably the best answer you will ever get to this particular question.