digitalmars.D.announce - Component programming with ranges
- Andrei Alexandrescu (3/3) Aug 06 2013 Vote up!
- bearophile (6/7) Aug 06 2013 It's an interesting article, but I wrote some comments. Not even
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (17/20) Aug 06 2013 This article is excellent.
- Jos van Uden (7/10) Aug 07 2013 If I understand it correctly "chunkBy" cannot accept a string lambda, du...
- Nick Sabalausky (4/8) Aug 09 2013 Great article. Even as an experienced D user, it really gave me a lot
Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Vote up! http://www.reddit.com/r/programming/comments/1jtzez/component_prog amming_with_ranges/ Andrei
Aug 06 2013
"bearophile" <bearophileHUGS lycos.com> writes:
Andrei Alexandrescu:http://www.reddit.com/r/programming/comments/1jtzez/component_programming_with_ranges/It's an interesting article, but I wrote some comments. Not even some answers before posting that to Reddit? http://forum.dlang.org/thread/20130802052432.GA495 quickfur.ath.cx#post-ibbicmqochwtirxdbmud:40forum.dlang.org Bye, bearophile
Aug 06 2013
=?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 08/06/2013 12:56 PM, Andrei Alexandrescu wrote:Vote up! http://www.reddit.com/r/programming/comments/1jtzez/component_programming_with_ranges/ AndreiThis article is excellent. Some notes: 1) More recent versions of std.datetime makes it possible to write 1.days instead of dur!"days"(1) From: .recurrence!((a,n) => a[n-1] + dur!"days"(1)) To: .recurrence!((a,n) => a[n-1] + 1.days) 2) It is mildly annoying that sometimes it is more convenient to do non-trivial processings in .front rather than .popFront. The problem of doing so is that the user of the code may call .front multiple times assuming that the result is a reference to an already processed data when in fact each call consumes CPU cycles. 3) I haven't compiled the code but it looks like some of the signature constraints can be simplified by taking advantage of isDateRange() more. Ali
Aug 06 2013
Jos van Uden <usenet fwend.com> writes:
On 6-8-2013 21:56, Andrei Alexandrescu wrote:Vote up! http://www.reddit.com/r/programming/comments/1jtzez/component_programming_with_ranges/ AndreiIf I understand it correctly "chunkBy" cannot accept a string lambda, due to the template constraint. Therefore the line alias attr = unaryFun!attrFun; seems unnecessary to me. By the way, when I try the code from github, it only prints the first 3 months. DMD32 D Compiler v2.063 (win7 64)
Aug 07 2013
Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Tue, 6 Aug 2013 12:56:48 -0700 Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Vote up! http://www.reddit.com/r/programming/comments/1jtzez/component_prog amming_with_ranges/Great article. Even as an experienced D user, it really gave me a lot to think about.
Aug 09 2013