Re: Article series about patterns idioms in D

2013-07-13 Thread Jakob Ovrum
On Friday, 12 July 2013 at 06:53:48 UTC, Benjamin Thaut wrote: Feedback is welcome. One of the article says that only one AliasThis is allowed per type, which is only half the truth. Multiple AliasThis are meant to be allowed by the language but has not been implemented.

Re: Article series about patterns idioms in D

2013-07-13 Thread Benjamin Thaut
Am 13.07.2013 13:10, schrieb Jakob Ovrum: On Friday, 12 July 2013 at 06:53:48 UTC, Benjamin Thaut wrote: Feedback is welcome. One of the article says that only one AliasThis is allowed per type, which is only half the truth. Multiple AliasThis are meant to be allowed by the language but has

Article series about patterns idioms in D

2013-07-12 Thread Benjamin Thaut
I started a small article series on D specific patterns idioms on my blog. I'm going to add more over time and hope that there are at least some in there which are not already known to everyone. You can find them here: http://3d.benjamin-thaut.de/?cat=17 Currently there are two: 1) D

Re: Article series about patterns idioms in D

2013-07-12 Thread Andrei Alexandrescu
On 7/11/13 11:53 PM, Benjamin Thaut wrote: I started a small article series on D specific patterns idioms on my blog. I'm going to add more over time and hope that there are at least some in there which are not already known to everyone. You can find them here:

Re: Article series about patterns idioms in D

2013-07-12 Thread Walter Bright
I think it's a nice blog and encourage you to do more! On 7/12/2013 12:34 AM, Andrei Alexandrescu wrote: 1) D implict conversion idiom: http://3d.benjamin-thaut.de/?p=90 Well you have a typo in the first title... The same misspelling occurs repeatedly in the article, so it's not a typo.

Re: Article series about patterns idioms in D

2013-07-12 Thread Benjamin Thaut
D strives to prevent implict conversion between user defined types at all costs. I don't think this is true. Implicit conversions are very useful. What D prevents are implicit conversions that can result in data loss, such as integer truncation. I did talk about implict conversions between

Re: Article series about patterns idioms in D

2013-07-12 Thread Ary Borenszweig
On 7/12/13 3:53 AM, Benjamin Thaut wrote: I started a small article series on D specific patterns idioms on my blog. I'm going to add more over time and hope that there are at least some in there which are not already known to everyone. You can find them here:

Re: Article series about patterns idioms in D

2013-07-12 Thread Tobias Pankrath
On Friday, 12 July 2013 at 09:42:28 UTC, Benjamin Thaut wrote: D strives to prevent implict conversion between user defined types at all costs. I don't think this is true. Implicit conversions are very useful. What D prevents are implicit conversions that can result in data loss, such as

Re: Article series about patterns idioms in D

2013-07-12 Thread Benjamin Thaut
Am 12.07.2013 17:12, schrieb Tobias Pankrath: On Friday, 12 July 2013 at 09:42:28 UTC, Benjamin Thaut wrote: D strives to prevent implict conversion between user defined types at all costs. I don't think this is true. Implicit conversions are very useful. What D prevents are implicit

Re: Article series about patterns idioms in D

2013-07-12 Thread Peter Alexander
On Friday, 12 July 2013 at 13:26:21 UTC, Ary Borenszweig wrote: This sentence worries me a bit: The code shown above has been tested with dmd 2.063.2 It seems like every minor release of D works different than previous ones. Is that true? Isn't it enough to say D2? Can something be done to

Re: Article series about patterns idioms in D

2013-07-12 Thread Benjamin Thaut
Am 12.07.2013 15:26, schrieb Ary Borenszweig: On 7/12/13 3:53 AM, Benjamin Thaut wrote: I started a small article series on D specific patterns idioms on my blog. I'm going to add more over time and hope that there are at least some in there which are not already known to everyone. You can

Re: Article series about patterns idioms in D

2013-07-12 Thread Benjamin Thaut
Am 12.07.2013 21:00, schrieb Walter Bright: On 7/12/2013 2:42 AM, Benjamin Thaut wrote: D strives to prevent implicit conversion between user defined types at all costs. Ok - but I think it would be clearer if the statement added for user defined types. For me there is already a between

Re: Article series about patterns idioms in D

2013-07-12 Thread Walter Bright
On 7/12/2013 12:22 PM, Benjamin Thaut wrote: Am 12.07.2013 21:00, schrieb Walter Bright: On 7/12/2013 2:42 AM, Benjamin Thaut wrote: D strives to prevent implicit conversion between user defined types at all costs. Ok - but I think it would be clearer if the statement added for user defined

Re: Article series about patterns idioms in D

2013-07-12 Thread Jesse Phillips
This statement kind of worries me: It seems like every minor release of D works different than previous ones. Why would you release a version if it wasn't different from the previous? It would be nice if one could give the oldest known working compiler, but there are still changes to old