Apple Silicon devices can get the same performance as a desktop in a laptop size. The only reason to get a desktop is if you need the Ultra chip.
And, the laptop gives you extra freedom for very, very little sacrifice (at least for Apple Silicon devices). I don't see any way you can argue for a desktop.
I have the first generation of the M1 (M1 Max) and this is the first Apple laptop I own that doesn't seem to hit any thermal or power limit. I do use an app to spin the fans faster when doing something like encoding a blu-ray movie with HandBrake, but it keeps going for hours without any noticeable drop in performance.
If you look at stress tests from a M1 on a Macbook Pro and a M1 on a Mac desktop, performance is similar. There might be a difference on sustained performance on the M1 Air, but that's because it doesn't have any fans.
Nothing. GP is making an assumption that all people need the same kind of hardware for the same kind of work as they do. None of my work touches on ML or heavy data processing (in the numeric sense), so hardware like that is useless to me and my coworkers. A beefier workstation is still useful (more cores, more RAM), but recent-ish laptops (post 2020 definitely, tail-end of the 2010s is still fine) provide more than enough horsepower.
Perhaps many people building code do not need multiple 16x PCI-Express cards in their day to day workflow, but like being able to move around with their laptop?
For lots of workloads it is basically true, though. Not something exclusive to Apple laptops of course, others have also been capable programming workhorses for quite some years. It's just weird to say that no compiling should be done on a laptop - that might've been true 10 years ago.
And, the laptop gives you extra freedom for very, very little sacrifice (at least for Apple Silicon devices). I don't see any way you can argue for a desktop.