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 32,833 of 33,346   
   Edward Rosten to Francis Glassborow   
   Re: iostream replacement   
   28 Jan 13 12:01:47   
   
   From: firstname.dot.lastname@googlemail.com   
      
   On Sun, 27 Jan 2013 22:43:30 -0600, Francis Glassborow wrote:   
      
   > 1) The << and >> operators have no meaning outside the context of   
   > the C family of languages. That is in marked contrast to   
   > mathematical operators (and I wish we had a way to provide new   
   > operator symbols so that expressions would look more familiar to   
   > domain specialists. Unicode has all the glyphs available and even   
   > has a page of mathematical symbols.)   
      
   Do you know of any proposals for this? It's an interesting idea,   
   though due to the way C++ parses, any new operators would generally   
   have a fixed precedence. This might lead to them having surprising   
   precedences to users of a particular domain where paper notation is   
   different from whatever precedence was chosen for C++.   
      
   That said, more opportunity for DSLs and infix notation is probably a   
   good thing.   
      
   > Actually now that I reflect on it, << and >> have sometimes been   
   > used in mathematics to mean 'much greater than' and 'much less than'   
   > so using them for bit shifts is already a little suspect (to those   
   > who wish to confine operator overloading to a single overarching   
   > meaning)   
      
   That would be an entertaining prospect, having to specify "much" for   
   this context.   
      
   gcc -fmuch=1e9  ...   
      
   -Ed   
      
      
   --   
         [ 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