Elektrine lite

← Feed

@peterhoneyman@a2mi.social

2026-10-25 13:06 UTC

@jschauma@mstdn.social I remember when I first encountered longjmp (in the 70s!) and thought “wow how extremely nifty” and also “this seems dangerous!”

Replies (1)

  • @markd@hachyderm.io 2026-10-25 18:36

    @peterhoneyman@a2mi.social @jschauma@mstdn.social I dunno, man. The first time I read about longjmp it gave me the heebie-jeebies. It always seemed like a sop to those first-gen assembler programmers brought up on self-modifying spaghetti code where "go to" reigned supreme. ALTER in COBOL seems like a similar sop. The pre-Dijkstra mob, if you will. Having said that, I have seen *one* legitimate use of longjmp where no alternative approach seemed possible. Namely "state threads"; a green threads library for C which used it to manage their home-grown stack.

    Open ##5275664