Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

overloading operators

Name: Anonymous 2011-01-31 15:59

why would you overload already existing operators in Sepples instead of inventing your own symbol or keyword to avoid confusion with non-overloaded standard operators?

Name: Anonymous 2011-01-31 16:04

ONE WORD: FORCED REINVENTION OF THE WHEEL

Name: Anonymous 2011-01-31 16:05

to implement certain mathematical theories that depends on complex structures?

Name: Anonymous 2011-01-31 16:09

>>1
to deploy innovate high-end solutions with low TCO with underlying standardized technology for high-performance e-business.

Name: Perl6 2011-01-31 16:12

>>1
ONE WORD: AN OPERATOR FOR everything. THREAD OVER

Name: Anonymous 2011-01-31 16:15

>>1
To make your own classes that represent mathematical entities such as vectors, matrices, quaternions, arbitrary precision data types etc, etc, etc.

Name: perl-VI 2011-01-31 16:38

Write this in one heavily used library and have fun!


sub infix:<==> ($n is rw, $m is rw) { my $returnValue = ($n != $m); $n = $m = Mu; return $returnValue };

Name: Anonymous 2011-01-31 17:11

>>1
Because C++ doesn't support user-defined operators or keywords, duh.

Name: Anonymous 2011-01-31 17:45

inventing your own symbol or keyword
The smiley face symbol does this with that, the telephone symbol does that with this.

Name: Anonymous 2011-01-31 17:48

>>8
actually it does

#define (ENTERPRISE X) (const static volatile __cdecl(noreturn) X)

Name: Anonymous 2011-01-31 18:03

>>10
U mena
#define ENTERPRISE(X) (const static volatile __cdecl(noreturn) (X))

Name: Anonymous 2011-01-31 18:06

>>11
U mena
#define ENTERPRISE(X) const static volatile _Noreturn X
_Noreturn is C1x

Name: Anonymous 2011-01-31 18:36

ISOMORPHISM

Name: Anonymous 2011-01-31 18:43

>>13
You can't say "isomorphism" without "OOP?"

Name: Anonymous 2011-01-31 19:41

>>10
How about defining a keyword my that would make hax my anus equivalent to anus.hax?

Name: Anonymous 2011-01-31 21:56

bump

Name: Anonymous 2011-01-31 23:12

>>15
hax my $anus;
VALID PERL CODE

Name: Anonymous 2011-02-01 2:22

Generic code, bitches.

template<typename MyAnus>
void hax(Anus& anus)
{
  anus ^= 2;
  anus ^= anus;
  anus ^= 21;
}

works for everything that defines ^= operator ([spoiler]NO EXCEPTIONS). I can use it like

  MyAnus myAnus;
  OpAnus opAnus;
  hax(myAnus);
  hax(opAnus);

If i decided to implement custom operators like ^^= and =^_^= then the code above wouldn't compile.

Name: Anonymous 2011-02-01 2:23

>>18
Some typos there(MyAnus = Anus in 1st code section, I left /spoiler tag), but you got the point.

Name: Anonymous 2011-02-01 4:07

>>18
>>19

Doing it wrong. You need at least five policy classes, 2 non-class template specializations and the function should be marked:

virtual void hax(Anus***& anus) const __attribute_((deprecated))

Name: Anonymous 2011-02-01 4:24

>>20
five policy classes, 2 non-class template
C++ isn't C#, Mister Gates.

using GNU extensions & pointers in a situation where pointers are unnecessary

Dear lord!

Name: Anonymous 2011-02-01 5:25

GNU extensions
Dear lord!


speaking of gods. God, I want GCC to die and clang to occupy its place. clang is soo much better.

Name: Anonymous 2011-02-01 5:38

>>21
Are you autistic? Stop quoting things that aren't there, and try not to pay your beet toll so easily.

Name: Anonymous 2011-02-01 7:43

>>4
low TCO
one word, STACK OVERFLOW, thread over.

Name: tray 2012-03-16 16:17

flagStuff|=1;

Don't change these.
Name: Email:
Entire Thread Thread List