News for hackers. Stuff that matters.
Re:Not Lisp again (2009) by Questron on Tuesday May 02, 2017 @03:55PM (#14249966)
Not really in machine language or even BASIC (see below).
Re:Not Lisp again (2009) by int_19h on Tuesday May 02, 2017 @07:38PM (#14251725)
Your BASIC example doesn't have any local variables to close over. It just references a global. That defeats the whole point of closures.

Passing or returning first-class functions aren't a problem. First-class closures (function pointer + state) are.

Re:Not Lisp again (2009) by Questron on Wednesday May 03, 2017 @05:49AM (#14254257)
You can create closures in CBM BASIC V2 by referencing arrays or creating thunks as an extension. But that's beside the original point. Implementing is not a lot of work but since my mega-deriver already solves the problem (derivation) elegantly and efficiently (most likely more efficiently than the original m68k lisp program), I really don't see any reason to use closures here. Do you?