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 32,004 of 33,346    |
|    Dave Harris to Roman W    |
|    Re: Why not add a feature to let lambda     |
|    14 Mar 12 12:11:54    |
   
   550f1bbe   
   From: brangdon@cix.compulink.co.uk   
      
   bloody_rabbit@gazeta.pl (Roman W) wrote (abridged):   
   > Thanks. But it is possible to define a new keyword for this   
   > purpose, for example "self". If this was done when introducing   
   > the lambda functions in C++, there would be no backward   
   > compatibility problem. If we wait, there will be the question of   
   > existing correct code being broken by the introduction of new   
   > keyword inside lambda functions.   
      
   It's already too late. But even if it wasn't, you seem to be saying that code   
   like:   
      
    void demo() {   
    int self = 1; // OK?   
    auto lambda = [&] { ++self; }; // Proposed error?   
    }   
      
   should not compile. I don't agree. Variable names shouldn't turn into keywords   
   just   
   because they are in a lambda expression.   
      
   -- Dave Harris, Nottingham, UK.   
      
      
   --   
    [ 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