[Issue 8062] UFCS and operator overloading

2020-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8062

Basile-z  changed:

   What|Removed |Added

 CC|b2.t...@gmx.com |

--


[Issue 8062] UFCS and operator overloading

2019-02-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8062

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |INVALID

--- Comment #7 from Basile-z  ---
Yes you're right. Please OP reopen with a better example in case the operator
was supposed to be a member func.

--


[Issue 8062] UFCS and operator overloading

2019-02-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8062

hst...@quickfur.ath.cx changed:

   What|Removed |Added

 CC||hst...@quickfur.ath.cx

--- Comment #6 from hst...@quickfur.ath.cx ---
Correct me if I'm wrong, but according to spec
(https://dlang.org/spec/operatoroverloading.html), operator overloading only
works for member functions, not for module-level functions. So UFCS wouldn't
apply in this case.

--


[Issue 8062] UFCS and operator overloading

2012-06-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8062



--- Comment #3 from Dmitry Olshansky dmitry.o...@gmail.com 2012-06-13 
12:22:05 PDT ---
(In reply to comment #2)
 (In reply to comment #1)
  As defined t shouldn't:
  UFCS presently only does go from fn(a,b, ...) - a.fn(b, ...); way.
  
 
 Well, no. UFCS transforms a.fn(b, ...) to fn(a,b, ...).

My bad, I actually meant it a.fn --- fn(a,...) way. Which brings us to the
point  - request is Invalid then?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8062] UFCS and operator overloading

2012-06-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8062



--- Comment #4 from timon.g...@gmx.ch 2012-06-13 12:37:21 PDT ---
(In reply to comment #3)
 
 My bad, I actually meant it a.fn --- fn(a,...) way. Which brings us to the
 point  - request is Invalid then?

I don't think it is invalid.

a + b - a.opBinary!+(b) - opBinary!+(a, b);

Probably this is on the borderline between bug and enhancement request -- I
think the documentation can be interpreted either way.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8062] UFCS and operator overloading

2012-06-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8062



--- Comment #5 from jens.k.muel...@gmx.de 2012-06-13 14:05:28 PDT ---
(In reply to comment #4)
 (In reply to comment #3)
  
  My bad, I actually meant it a.fn --- fn(a,...) way. Which brings us to the
  point  - request is Invalid then?
 
 I don't think it is invalid.
 
 a + b - a.opBinary!+(b) - opBinary!+(a, b);
 
 Probably this is on the borderline between bug and enhancement request -- I
 think the documentation can be interpreted either way.

Which documentation are you referring to? I don't think this is an enhancement.
How can it be an enhancement? Are there exceptions when UFCS has to be applied?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8062] UFCS and operator overloading

2012-05-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8062


Dmitry Olshansky dmitry.o...@gmail.com changed:

   What|Removed |Added

 CC||dmitry.o...@gmail.com


--- Comment #1 from Dmitry Olshansky dmitry.o...@gmail.com 2012-05-31 
06:21:54 PDT ---
As defined t shouldn't:
UFCS presently only does go from fn(a,b, ...) - a.fn(b, ...); way.

And arguably rightfully so, as it already may introduce some hijacking.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---