home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 116,290 of 117,927   
   Anton Ertl to Paul Rubin   
   Re: Closures   
   10 Mar 24 08:40:57   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   Paul Rubin  writes:   
   >albert@spenarnc.xs4all.nl writes:   
   >> I always thought that closures are invented by lispers, because   
   >> in lisp you cannot write normal programs.   
   >   
   >Lisp didn't get them until fairly late in its evolution, I think.  Maybe   
   >old time Lispers here would know.  But I think Scheme was the first   
   >dialect that really made use of them.   
      
   Yes, Scheme was the first implemented Lisp with lexical scoping and it   
   allows treating closures as first-class values.  However, static   
   scoping was the original intention of McCarthy when he designed Lisp,   
   and he considered the dynamically scoped implementation to be a bug.   
   However, Hyrum's law struck, and mainstream Lisp kept dynamic scoping,   
   with static scoping being added in Common Lisp.   
      
   >Algol 60 its own version much   
   >earlier, in the form of call-by-name parameters.   
      
   That, too, but Algol 60 also has nested functions/procedures with   
   static scoping.  Algol 60 does not have first-class closures, though,   
   and some people reservere the name "closure" to first-class closures.   
      
   - anton   
   --   
   M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html   
   comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html   
        New standard: https://forth-standard.org/   
      EuroForth 2023: https://euro.theforth.net/2023   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca