digitalmars.D.announce - Article series about patterns & idioms in D
- Benjamin Thaut (10/10) Jul 11 2013 I started a small article series on D specific patterns & idioms on my
- Andrei Alexandrescu (3/13) Jul 12 2013 Well you have a typo in the first title...
- Walter Bright (10/12) Jul 12 2013 The same misspelling occurs repeatedly in the article, so it's not a typ...
- Benjamin Thaut (6/11) Jul 12 2013 I did talk about implict conversions between user defined types. D does
- Tobias Pankrath (2/16) Jul 12 2013 What's about alias this?
- Benjamin Thaut (5/19) Jul 12 2013 Did you even read the article?
- Walter Bright (4/15) Jul 12 2013 Ok - but I think it would be clearer if the statement added "for user de...
- Benjamin Thaut (6/12) Jul 12 2013 For me there is already a "between user defined types" in the following
- Walter Bright (2/15) Jul 12 2013 It is. I was commenting from memory rather than re-reading it. My mistak...
- Ary Borenszweig (6/16) Jul 12 2013 This sentence worries me a bit:
- Benjamin Thaut (11/32) Jul 12 2013 The shown code should work all versions of D 2.0 since 2.053 (I'm using
- Peter Alexander (6/11) Jul 12 2013 D is still in the alpha phase of development, so things are still
- Jesse Phillips (8/10) Jul 12 2013 Why would you release a version if it wasn't different from the
- Jakob Ovrum (4/5) Jul 13 2013 One of the article says that only one AliasThis is allowed per
- Benjamin Thaut (5/10) Jul 13 2013 Thanks for the information, didn't know that. Still I like to only
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 implict conversion idiom: http://3d.benjamin-thaut.de/?p=90 2) D templated interface idiom: http://3d.benjamin-thaut.de/?p=94 Feedback is welcome. Kind Regards Benjamin Thaut
Jul 11 2013
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: http://3d.benjamin-thaut.de/?cat=17 Currently there are two: 1) D implict conversion idiom: http://3d.benjamin-thaut.de/?p=90 2) D templated interface idiom: http://3d.benjamin-thaut.de/?p=94 Feedback is welcome. Kind Regards Benjamin ThautWell you have a typo in the first title... Andrei
Jul 12 2013
I think it's a nice blog and encourage you to do more! On 7/12/2013 12:34 AM, Andrei Alexandrescu wrote:The same misspelling occurs repeatedly in the article, so it's not a typo. "implicit" also, buildin => builtin "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.1) D implict conversion idiom: http://3d.benjamin-thaut.de/?p=90Well you have a typo in the first title...
Jul 12 2013
"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 user defined types. D does not have implict construction, or implict casting like C++ does. I did not talk about builtin types. -- Kind Regards Benjamin Thaut
Jul 12 2013
On Friday, 12 July 2013 at 09:42:28 UTC, Benjamin Thaut wrote:What's about alias this?"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 user defined types. D does not have implict construction, or implict casting like C++ does. I did not talk about builtin types.
Jul 12 2013
Am 12.07.2013 17:12, schrieb Tobias Pankrath:On Friday, 12 July 2013 at 09:42:28 UTC, Benjamin Thaut wrote:Did you even read the article? -- Kind Regards Benjamin ThautWhat's about alias this?"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 user defined types. D does not have implict construction, or implict casting like C++ does. I did not talk about builtin types.
Jul 12 2013
On 7/12/2013 2:42 AM, Benjamin Thaut wrote:"alias this" is used for implicit casting. BTW, it's implicit. There's an 'i' there!"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 user defined types. D does not have implict construction, or implict casting like C++ does.I did not talk about builtin types.Ok - but I think it would be clearer if the statement added "for user defined types".
Jul 12 2013
Am 12.07.2013 21:00, schrieb Walter Bright:On 7/12/2013 2:42 AM, Benjamin Thaut wrote:For me there is already a "between user defined types" in the following sentence: "D strives to prevent implicit conversions between user defined types at all costs." Is that not clear enough?Ok - but I think it would be clearer if the statement added "for user defined types"."D strives to prevent implicit conversion between user defined types at all costs."
Jul 12 2013
On 7/12/2013 12:22 PM, Benjamin Thaut wrote:Am 12.07.2013 21:00, schrieb Walter Bright:It is. I was commenting from memory rather than re-reading it. My mistake.On 7/12/2013 2:42 AM, Benjamin Thaut wrote:For me there is already a "between user defined types" in the following sentence: "D strives to prevent implicit conversions between user defined types at all costs." Is that not clear enough?Ok - but I think it would be clearer if the statement added "for user defined types"."D strives to prevent implicit conversion between user defined types at all costs."
Jul 12 2013
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: http://3d.benjamin-thaut.de/?cat=17 Currently there are two: 1) D implict conversion idiom: http://3d.benjamin-thaut.de/?p=90 2) D templated interface idiom: http://3d.benjamin-thaut.de/?p=94 Feedback is welcome. Kind Regards Benjamin ThautThis 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 prevent this?
Jul 12 2013
Am 12.07.2013 15:26, schrieb Ary Borenszweig:On 7/12/13 3:53 AM, Benjamin Thaut wrote:The shown code should work all versions of D 2.0 since 2.053 (I'm using it since then). I only mentioned the version of the dmd compiler, because I previously had issues with some of my articles where someone would say "but that statement is not true, it works with the current version of dmd". Kind Regards Benjamin Thaut -- Kind Regards Benjamin ThautI 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 implict conversion idiom: http://3d.benjamin-thaut.de/?p=90 2) D templated interface idiom: http://3d.benjamin-thaut.de/?p=94 Feedback is welcome. Kind Regards Benjamin ThautThis 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 prevent this?
Jul 12 2013
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 prevent this?D is still in the alpha phase of development, so things are still likely to change and break regularly. There's not much that can be done other than what's already being done, i.e. just try to implement everything and fix the major bugs as fast as possible. There's no silver bullet.
Jul 12 2013
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 behavior which means some code would have more specific compiler versions needed. Work is being done, but the issue will exist for some time so process to make it less painful is being put in place.
Jul 12 2013
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.
Jul 13 2013
Am 13.07.2013 13:10, schrieb Jakob Ovrum:On Friday, 12 July 2013 at 06:53:48 UTC, Benjamin Thaut wrote:Thanks for the information, didn't know that. Still I like to only advertise things that are already working. Kind Regards Benjamin ThautFeedback 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.
Jul 13 2013