On Wednesday, 24 June 2020 at 09:01:28 UTC, claptrap wrote:
On Wednesday, 24 June 2020 at 00:53:58 UTC, H. S. Teoh wrote:
On Tue, Jun 23, 2020 at 11:53:36PM +, claptrap via
If your implementations are based on built-in operators, you
could use mixins to unify the implementations into
On Wednesday, 24 June 2020 at 00:53:58 UTC, H. S. Teoh wrote:
On Tue, Jun 23, 2020 at 11:53:36PM +, claptrap via
If your implementations are based on built-in operators, you
could use mixins to unify the implementations into one, e.g.:
Ah yeah thats useful, to expand a bit what about
On Tuesday, 23 June 2020 at 23:53:36 UTC, claptrap wrote:
So you have opBinary and half a dozen operators to implement.
Do you use a separate method for each operator or do you have
one method and a big static if else if to select code path?
I assume they are functionally equivalent? So its
On Tue, Jun 23, 2020 at 11:53:36PM +, claptrap via Digitalmars-d-learn
wrote:
> So you have opBinary and half a dozen operators to implement. Do you
> use a separate method for each operator or do you have one method and
> a big static if else if to select code path?
[...]
If your
So you have opBinary and half a dozen operators to implement. Do
you use a separate method for each operator or do you have one
method and a big static if else if to select code path?
I assume they are functionally equivalent? So its just about
style?