[Issue 9214] TickDuration.to should probably be a property

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 26 21:43:03 PST 2012


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #1 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-12-26 21:43:00 PST ---
to makes no sense as a property. It's a conversion function, not an abstraction
for a variable. If anything, the example needs to be changed.

Now, there's a decent chance that with what a lot of people think about UFCS
and templated functions that using to without the parens for the function call
won't be necessary long term, but if it's a property, then it'll likely be
required to not have the parens long term, and given that to is a conversion
function, I really don't think that makes sense. If you want a property, then
use one of the property functions which wrap to (msecs, seconds, etc.).

I think that I'll just create a commit which changes the example to use the
property function instead of to, since that's cleaner anyway.

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


More information about the Digitalmars-d-bugs mailing list