[phobos] std.complex: ready for Phobos?

Andrei Alexandrescu andrei at erdani.com
Mon Apr 19 14:05:07 PDT 2010


It's a good point. Replying to your other point, we need some traits to 
tell whether something is a built-in float. For those that look like a 
float, we should define isFloatingPointLike.

Andrei

On 04/19/2010 04:02 PM, Lars Tandle Kyllingstad wrote:
> Another point is that if Complex!T is to support arbitrary FP types,
> then the trigonometric functions in std.math must too. Personally, I
> think we should keep the constraint for now. If we loosen it later, at
> least nothing will break.
>
> -Lars
>
>
>
> ----- Reply message -----
> From: "Lars Tandle Kyllingstad" <lars at kyllingen.net>
> Date: Mon, Apr 19, 2010 22:39
> Subject: [phobos] std.complex: ready for Phobos?
> To: "Phobos mailing list" <phobos at puremagic.com>
>
> 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
>  >> phobos at puremagic.com
>  >> http://lists.puremagic.com/mailman/listinfo/phobos
>
>
> --
> Lars Tandle Kyllingstad
> @: lars at kyllingen.net
> #: 40233221
> w: http://www.kyllingen.net
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
>
>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list