On Tuesday, 26 February 2013 at 21:10:30 UTC, Ary Borenszweig wrote:
On 2/26/13 6:01 PM, Jacob Carlborg wrote:
On 2013-02-26 20:52, H. S. Teoh wrote:

Do you have any specific examples?

Return the date from two days ago:

Ruby on Rails:
2.days.ago
Date.today
Time.now

D:
Clock.currTime - 2.days
// Not sure how to do the other two in D

This is not that bad but it's a bit less intuitive. Here we also have shortening of "current" which just saves three characters, for no reason.

I think it's mostly std.algorithm that is the problem.

And also having to import std.algorithm. In Ruby you can do map, sort and whatever without using an import. You use it so often that an import is annoying.

I often find myself importing std.algorithm, std.array and std.range even for the simplest things. std.string, std.ascii, std.conv, std.stdio is also quite common at the top of my files.. And *then* I import modules more specific for the problem I'm going to solve :) I sometimes wish I was using an editor that automatically added the imports for me.

Reply via email to