D as a prototyping language (for C/C++ projects)
Ary Borenszweig
ary at esperanto.org.ar
Tue Feb 26 13:10:29 PST 2013
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.
More information about the Digitalmars-d
mailing list