digitalmars.D.announce - D Functional garden
- Seb (14/14) Feb 29 2016 I have started to learn D lately and as a part of my learning
- jmh530 (10/13) Feb 29 2016 I like.
- Seb (6/23) Mar 01 2016 Great idea. You are absolutely right! I changed the snippets
- asdf (4/14) Feb 29 2016 Would it be good to have both getting-used-to-syntax and more
- landaire (2/4) Feb 29 2016 Looks really good. Nice work.
- sigod (2/17) Mar 01 2016 Nice idea. I like it.
I have started to learn D lately and as a part of my learning process I decided to put my insights into a new, open platform - the D Functional Garden. It maintains a variety of snippets that can be used to learn D or help one as a quick reference. It contrast to Guillaume Piolat's d-idioms [1], all samples are valid code and automatically tested on every run - it is basically one big unittest suite. Moreover as you might tell from the name, it focuses mostly one a functional style within D. Have a look yourself at: https://garden.dlang.io/ PS: This project is quite new, so contributions (ideas, snippets) are welcome ;-) [1] https://p0nce.github.io/d-idioms/
Feb 29 2016
On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:I have started to learn D lately and as a part of my learning process I decided to put my insights into a new, open platform - the D Functional Garden.I like. One suggestion. It can be hard to read long chains of calls. When you do it this way, the assert part also looks a little messy. This would give: auto result = [1,2,3,4] .chunks(2) .map!(sum) .array; assert(result == [3, 7]);
Feb 29 2016
On Monday, 29 February 2016 at 15:37:06 UTC, jmh530 wrote:On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:Great idea. You are absolutely right! I changed the snippets accordingly.I have started to learn D lately and as a part of my learning process I decided to put my insights into a new, open platform - the D Functional Garden.I like. One suggestion. It can be hard to read long chains of calls. When you do it this way, the assert part also looks a little messy. This would give: auto result = [1,2,3,4] .chunks(2) .map!(sum) .array; assert(result == [3, 7]);Would it be good to have both getting-used-to-syntax and more effective-problem-solving as well? Then again if the snippets are realistic that would already be there.I think what you are going for is sth like grouping or categories - yep that definitely makes sense and once I find time, I will add this too :)
Mar 01 2016
On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:It contrast to Guillaume Piolat's d-idioms [1], all samples are valid code and automatically tested on every run - it is basically one big unittest suite. Moreover as you might tell from the name, it focuses mostly one a functional style within D. Have a look yourself at: https://garden.dlang.io PS: This project is quite new, so contributions (ideas, snippets) are welcome ;-) [1] https://p0nce.github.io/d-idioms/Would it be good to have both getting-used-to-syntax and more effective-problem-solving as well? Then again if the snippets are realistic that would already be there.
Feb 29 2016
On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:Have a look yourself at: https://garden.dlang.io/Looks really good. Nice work.
Feb 29 2016
On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:I have started to learn D lately and as a part of my learning process I decided to put my insights into a new, open platform - the D Functional Garden. It maintains a variety of snippets that can be used to learn D or help one as a quick reference. It contrast to Guillaume Piolat's d-idioms [1], all samples are valid code and automatically tested on every run - it is basically one big unittest suite. Moreover as you might tell from the name, it focuses mostly one a functional style within D. Have a look yourself at: https://garden.dlang.io/ PS: This project is quite new, so contributions (ideas, snippets) are welcome ;-) [1] https://p0nce.github.io/d-idioms/Nice idea. I like it.
Mar 01 2016