http://d.puremagic.com/issues/show_bug.cgi?id=5467


Robert Clipsham <rob...@octarineparrot.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rob...@octarineparrot.com


--- Comment #4 from Robert Clipsham <rob...@octarineparrot.com> 2012-01-02 
00:15:40 GMT ---
(In reply to comment #0)
> 1. Something that's just like another type yet "parallel" with it. This is 
> good
> for abstractions that encode different units of measurement that aren't
> supposed to be mixed.
> 
> ParallelTypedef!double Miles;
> 
> Such a type should accept explicit initialization from a regular double:
> 
> auto dist = Miles(3.2);
> 
> However it shouldn't accept initialization from another parallel typedef:
> 
> ParallelTypedef!double Kms;
> auto dist1 = Kms(4);
> auto dist2 = Miles(dist1); // no

<bikeshed>
This needs a better name, parallel is transitive, so Miles(dist1) should work
(if there are 3 things, A, B and C, A is parallel to B and B is parallel to C,
then A is parallel to C).
</bikeshed>

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

Reply via email to