home bbs files messages ]

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

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

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

   Message 31,994 of 33,346   
   George Neuner to All   
   Re: Why not add a feature to let lambda    
   07 Mar 12 16:47:42   
   
   5db26a83   
   From: gneuner2@comcast.net   
      
   On Mon,  5 Mar 2012 11:35:57 -0800 (PST), rockeet    
   wrote:   
      
   >Why C++ committee is so rigidity? They define lambda as exactly the   
   >academism, and intentional didn't add a lambda self reference.   
   >The best solution I have found is to bind the lambda to a   
   >std::function<...> object.   
      
   There is nothing unusual about this.  Although there may indeed exist   
   a language with self referencing closures, all the ones I know of that   
   support closure creation - Lisp, Scheme, ((O)?Ca)?ML, Haskell,   
   Smalltalk - create *anonymous* functions which must be bound to an   
   identifier for delayed invocation (such as in the case of recursion).   
      
   The major difference is that C++ has, IMO, a particularly ugly syntax   
   for lambda and for binding the resulting anonymous function to an   
   identifier.  Given the existing type system I don't see how the syntax   
   could be improved significantly ... but that's a different discussion.   
      
   George   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- 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