From: dave@boostpro.com   
      
   on Sat Apr 14 2012, "James K. Lowden" wrote:   
      
   > I don't consider iterators to an unpassed container to   
   > be i/o parameters. I think it's notable, actually, that the STL does   
   > not provide sort>.   
      
   What in particular do you think is notable about it?   
      
   There are actually some very good arguments that the STL should have   
   provided that interface, and the committee is actively considering   
   adding it.   
      
   > Dave Abrahams suggests that the this pointer in e.g. list::sort() can   
   > be thought of as an i/o parameter in some sense. Down that road lies a   
   > long computer science debate that I didn't mean to engage.   
      
   I don't see that there's anything much debatable here. Fundamentally   
   the computation that sorts a list is the same thing whether you spell it   
   l.sort() (yes, the STL does provide that one) or sort(l). The   
   underlying machine model against which we program in C++ includes   
   mutation of state at a fundamental level. If you want to live in a   
   world where you can dismiss mutation of state as rare, you should be   
   programming in Haskell. (**)   
      
   -Dave   
      
   (**) Which isn't to say you're unwelcome here in C++-land, of course :-)   
      
   --   
   Dave Abrahams   
   BoostPro Computing   
   http://www.boostpro.com   
      
      
    [ 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)   
|