Re: Why isn't global operator overloading allowed in D?

2015-10-15 Thread John Colvin via Digitalmars-d-learn
On Thursday, 15 October 2015 at 15:45:00 UTC, Shriramana Sharma wrote: John Colvin wrote: On Wednesday, 14 October 2015 at 15:02:02 UTC, Shriramana Sharma wrote: What binary arithmetic operators do you need that real[] doesn't already support? OMG silly me! I can already do a[] /= b[]... D

Re: Why isn't global operator overloading allowed in D?

2015-10-15 Thread Shriramana Sharma via Digitalmars-d-learn
John Colvin wrote: > On Wednesday, 14 October 2015 at 15:02:02 UTC, Shriramana Sharma > wrote: > What binary arithmetic operators do you need that real[] doesn't > already support? OMG silly me! I can already do a[] /= b[]... D is great! :-D Thanks a lot!

Re: Why isn't global operator overloading allowed in D?

2015-10-14 Thread WagonPassenger via Digitalmars-d-learn
on operator overloading allowed at the global level (even within a single module), and searched through the forum and saw this thread: http://forum.dlang.org/post/jeyaozvegcnivcppu...@forum.dlang.org Why isn't global operator overloading allowed in D? Having to construct a class just to

Re: Why isn't global operator overloading allowed in D?

2015-10-14 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 14 October 2015 at 15:02:02 UTC, Shriramana Sharma wrote: Hello. I just came upon a need in my program to make binary arithmetic operators valid between two real[] in my programs What binary arithmetic operators do you need that real[] doesn't already support?

Re: Why isn't global operator overloading allowed in D?

2015-10-14 Thread Shriramana Sharma via Digitalmars-d-learn
lowed at the global level (even within a > single module), and searched through the forum and saw this thread: > http://forum.dlang.org/post/jeyaozvegcnivcppu...@forum.dlang.org > > Why isn't global operator overloading allowed in D? Hmm, just now saw this one too: http://forum

Why isn't global operator overloading allowed in D?

2015-10-14 Thread Shriramana Sharma via Digitalmars-d-learn
single module), and searched through the forum and saw this thread: http://forum.dlang.org/post/jeyaozvegcnivcppu...@forum.dlang.org Why isn't global operator overloading allowed in D? Having to construct a class just to write a quick operator overload for two built-in types isn't a clea