Re: operator overload for sh-like scripting ?

2020-02-17 Thread Simen Kjærås via Digitalmars-d-learn
On Monday, 17 February 2020 at 13:03:38 UTC, Basile B. wrote: eg Sh(echo) < "meh"; struct Sh { // you see the idea we have op overload for < here } You can't overload < separately - all the comparison operators (<, <=, >, >=) are handled via opCmp. Even if you choose to go down

Re: operator overload for sh-like scripting ?

2020-02-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 17 February 2020 at 13:03:38 UTC, Basile B. wrote: Sh(echo) < "meh"; Not allowed in D - it only does a comparison overload which covers < and > (and <= and >=). Though we could do strings and stuff. especially with my string interpolation dip

operator overload for sh-like scripting ?

2020-02-17 Thread Basile B. via Digitalmars-d-learn
eg Sh(echo) < "meh"; struct Sh { // you see the idea we have op overload for < here }