Make dur a property?

Jonathan M Davis jmdavisProg at gmx.com
Wed Jan 23 12:46:30 PST 2013


On Wednesday, January 23, 2013 21:33:07 Jacob Carlborg wrote:
> This is how it should look like. Date ranges in Ruby on Rails can be
> really beautiful:
> 
> date = 2.days.ago
> 
> I think we should have the same in D.

I confess that it's syntax like that that makes dislike UFCS. I can see why 
you might like it, but personally, I find it to be hideous.

But as long as you're not using -property, you can do 2.days to get a Duration 
of 2 days, much as I wish that you couldn't.

- Jonathan M Davis


More information about the Digitalmars-d mailing list