Andrei Alexandrescu wrote:
Looks great. I have a few suggestions:

* Since this is all new code, I suggest we use const throughout wherever sensible (for all @property's, opEquals etc).

Good point, I'll add that.


* The if isFloatingPoint!T constraint worries me that we won't support unlimited precision reals or fixed point numbers later. I suggest we leave the constraint out for now.

I've considered that. But wouldn't it make more sense to define isFloatingPoint and isIntegral so they match compile-time interfaces instead of specific (built-in) types?


* opAssign and opOpAssign should return a ref

See bug 2460, "ref functions can't be template functions". If this is a low-priority bug, I can always work around it, but that seems rather pointless. Also, considering that almost all operator overloading is now done with templates, it *really* should be fixed.


Otherwise, this looks great. Good work!

Thanks! :)

-Lars



On 04/19/2010 04:10 AM, Lars Tandle Kyllingstad wrote:
I've attached a new version of my std.complex proposal to this message.

I can't think of more features to add, so please have a look at it and
tell me what you think. Specifically,

- What's missing?
- Should anything be removed?
- And, importantly, this potentially being my first contribution
to Phobos: Does the code meet Phobos' quality requirements?

If there are no protests, I'll commit it to SVN.

-Lars



_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos


--
Lars Tandle Kyllingstad
@: [email protected]
#: 40233221
w: http://www.kyllingen.net

_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to