Whether a gaming laptop is suitable for programming depends on hardware specs and other factors. If you are a web developer and your budget is limited then choose a gaming laptop with at least an AMD Ryzen 7 processor. If you do game design or related work then go with a laptop with at least 6GB Nvidia 3050 graphics card and above.
I suggested AMD because AMD offers a better value for money process. Intel also provides best-in-class processes as they recently launched 12th Gen processors. But Intel’s prices are higher than AMD’s.
Mentioned above are the mini requirements for programmers who also love playing games. Buy a laptop with the above features if you want to do programming and gaming flawlessly for the next 4-8 years.
My brother is also a developer and he’s using a gaming laptop with a Ryzen7 processor and an Nvidia 1650 graphic card.
He’s happy with the performance and never faces any issue with git push or executing code. Although he’s not an extreme gamer.
Yes, if your gaming laptop has all the above hardware specs then you can easily do programming on your gaming laptop and play any kind of game with good FPS.