The answer here is very simple.
This is a work expense and a complete 100% tax deduction in almost all jurisdictions. We're not discussing a "jet ski" -type purchase here.
Yes, of course, definitely, save save save to pay for it. Avoid debt at all costs.
Congratulations, and enjoy your NO DEBT purchase in a matter of weeks.
There is just no, zero, argument for taking on the debt if you can save the last little bit in a reasonable time.
Regarding buying expensive toys. I often literally get thrown off this list for swearing at folks who come on here asking if they should buy an expensive car, or other pointless expensive toy.
I am apparently the last-word, gold standard on this list for "do not waste money on toys" :-)
However this is a work expense. A programmer having computers is, self-evidently, like a gunslinger having a sidearm.
- Always, always, always buy desktop boxes instead of laptops - if at all possible (this is true for both apple/'doze).
Allow me to copy and paste, as a working programmer always, always, always buy desktop boxes instead of laptops if at all possible
(A) Laptops are garbage technically. (Just one particular problem is the noise; it's very bad for you constantly listening to the stupid laptop fans. There's no real solution to this - ridiculously, I have to keep a pile of those frozen gel packs in a freezer and swap them under the laptop every few hours.)
(B) Laptops are rarely used "on your lap", people just plug in some extra monitors and a real keyboard and use them in place.
However the fact is, in many business / contracting / work situations, you do realistically need a laptop. Unfortunately Apple models are plain expensive. (It goes without saying, they are junk and overpriced, but there's not much you can do.) And for your PC side, in certain programming fields you do unfortunately need a ridiculous" gamer" laptop with a recent vid. card etc. So it's expensive.
(Indeed, note that if you work in the rofl "app industry" you'll also unfortunately need to spend a small fortune annually on devices, in most cases. Again, 100% tax deduction at least.)
By all means, don't buy the 4000 laptop if the 3000 one will suffice. But, as a programmer you only have one work instrument .. "computers" .. so you can't skimp on it. It has to last for years, long hours per week.
One caveat ... notice today's date ...
OP, you should save to purchase. But it's Dec 15.
Depending on your jurisdiction and situation, it may be that if you purchase this week, you can put it in this year's tax calculations.
(Indeed, for example we unfortunately have a whole pile of purchases coming up, and, as much as it makes me grind my over-ground teeth, might as well do it before Jan 1.)
So that's a possible consideration. Maybe you can pay for it on a card but pay it off before any interest strikes? (I believe you get a few weeks "grace period" when using a credit card.)
Summary
Do not use debt. End of story.
If at all possible programmers should use desktops, not laptops. Laptops are a lose/lose/lose/lose situation versus desktop boxes
Conceivably there's an argument to get the purchase in before Jan 1, depending on your jurisdiction / tax details.