I'd say COBOL is a bad example. I personally know someone hit by that so bad he became homeless and ended up spray painting street numbers on curbs for money.
I've never understood how that could be possible. What makes COBOL programming so different from work in any other language as to make it impossible to pick up, say, C? I've heard numerous similar anecdotes, but never from programmers who struggled to transition from any language but COBOL. I'm sympathetic, but never having worked in COBOL myself, I can't help but be curious what makes it so distinct.
I spent many years working with COBOL & CICS on AS/400 and mainframe and PC.
COBOL is such an excellent high-level abstraction from the computer hardware that it's almost pseudo-code and one can translate business requirements very easily, but therefore working in nothing but COBOL isolates a developer from underlying technology and trends.
I wrote a few algorithms in COBOL, basic sorts and trees, which was really awkward and whilst it can be forced to do other tricks such as data compression and encryption[0] it's really not conducive to such tasks. As a result it's easy to sit in a COBOL-bubble writing IF...ELSE business code all day long and not do anything computer-sciency until the memory and skills fade.
Thankfully my COBOL programs called down to C programs to do nitty-gritty work otherwise I'd probably have been pigeonholed both in skills and career; many companies seem to ignore COBOL experience as 'not proper programming', for the reasons above. However being one of the few people dealing with the old COBOL code gave me huge experience in working with the business clients.
[0] we had one vendor offer us AES-in-COBOL for scary amounts of money.
CObol is the epitome of a walled garden. Everything from accessing data to ui is done the cobol way. Simple things like arbitrary length string and dynamic memory allocation aren't in standard cobol.
Many companies used to run cobol bootcamps to hire developers. As recently as 2004, one local company was still doing them here. Very few of their developers studied cs in school. The boot campers studied who knows, and those who studied computers often majored in cis or mis.
So you can see how those people are really starting off at zero when it comes to switching to more modern dev stacks. I've personally seen very few make the transition.
My first paid dev job was at such a place, doing mainframe cobol, but I'd been doing hobby programming since I was 12, and writing games in c++, so I wasn't typical. I completed a bs in cs at night and moved on.