[HN Gopher] C++ left arrow operator (2016)
___________________________________________________________________
C++ left arrow operator (2016)
Author : layer8
Score : 33 points
Date : 2024-03-24 17:22 UTC (5 hours ago)
(HTM) web link (www.atnnn.com)
(TXT) w3m dump (www.atnnn.com)
| rryugciuf wrote:
| Oh my
| a1o wrote:
| Love code made for kicks. Also the other articles on the blog are
| super different one from the other!
| spacechild1 wrote:
| This is pretty evil :-D
| 1letterunixname wrote:
| But is it as evil as? delete this;
|
| https://isocpp.org/wiki/faq/freestore-mgmt#delete-this
| dzogchen wrote:
| Operator overloading is one of those things that needs to be done
| with good taste.
| TillE wrote:
| Honestly I can't think of many notable abuses of operator
| overloading in C++.
|
| The worst is probably the original idea to overload the bit
| shift operators for stream I/O, something which never really
| caught on outside the standard library.
| blt wrote:
| Agree. Meanwhile there are flagship C++ libraries like Eigen
| where it's indispensable. C++ has mistakes but operator
| overloading isn't one of them.
| hawski wrote:
| The could be a couple of examples in Boost like Boost Spirit
| [0]. Qt had some like putting stuff in containers with
| bitshift operator. There was a GUI toolkit that used +
| operator to put widgets on a window.
|
| [0] https://www.boost.org/doc/libs/1_78_0/libs/spirit/doc/htm
| l/s...
| 1letterunixname wrote:
| _Haskell, F#, and Scala enter the chat to lend a hand with custom
| operators._
___________________________________________________________________
(page generated 2024-03-24 23:00 UTC)