Also anecdotally I know several people who planned/hoped to retire in their late 30s/early 40s. None of them did and are still working now in their 50s and even one in their 60s. Mixture of reasons from health problems in the family to financial issues to just not knowing wtf to do when not working now their kids are adults and living their own lives.
I wasn't able to stop. Applied my savings in day trading, everything went well until 2009 happened and most of it washed away. Applied what remained on the tuition of a top university to up my academic credentials and then went on try other tech industries (e.g. aerospace). Today have a small startup (Europe). Life is hard (empty bank account at the end of the month) but the plus side is that your brain keeps active.
If you really like writing technology, in my opinion it gets difficult to stop doing what you naturally enjoy doing.