For your reference, I am currently using a XPS 15 (Model 9550, 2015-Now) and a MacBook Pro 15'' (Early 2013, 2013-Now). I'd consider my MacBook my daily driver for coding while the XPS 15 my video editor and gamer. There are different issues that you may need to consider before buying Windows / Mac laptops. For Windows laptops, the main drawback for coders is the PowerShell or CMD, as they simply does not work so beautifully as Terminal on a Mac or Linux OS. You can always find alternatives to it, like installing Linux on Windows or Linux as your second OS, but this way switching operating systems would be a pain. For Mac laptops (MacBook Pro primarily), hardwares are the ones you cannot customise, and almost certainly that one or two of them will not work properly (hearing about thermal issues, keyboard issues, charging port issues... etc.) (my MacBook has got an uneven keyboard to type on and a short-lasting battery, which I fixed with a professional toolkit plus some spare parts I got from eBay). In the end, MacBooks are more of a productivity machine that works beautifully and satisfying (when it works), and Windows PCs are creative machines that you can customise to your needs, and are cheaper (specific models have specific features). If you cannot conclude which you are going to buy after reading this short post (most certainly you don't), trying searching for keywords like "A vs B", "pros and cons of A, B".
If you'd like to have a short reply, I'd say yes, as long as your code does not need that much of computing power. (E.x. To run some of the power-intensive MatLab calculations, I had rent a server on Google Cloud for its computation power)
Depends what coding / programming your talking about, but in general yes.
I'd rather write a C program on linux or a mac than in windows (just my preference), but I'd rather write java on a linux or in windows than on a mac (again, very subjective).
Platform doesn't make a huge difference for quite a few languages, so it really depends on which platform you're happier with - though does make a difference for some (e.g. if you want to write iphone apps you pretty much have to use a mac).
Another consideration, hardware bang for buck - build your own machine and go linux is the best bang for buck for a lot of programming environments.
I'm pleased to see Linux getting a mention. I avoided it for fear of being accused of being anti-Apple or anti-MS but a very inexpensive laptop would run Cinnamon Mint or similar quite adequately. I built my small business Linux server in 2006 now runs Open Suse 12.3 which itself is at least five years old.
Another cheap option is an Android tablet with Terminal Emulator, Busybox and a Bluetooth keyboard.
Pity the OP hasn't returned to tell us what he codes.