digitalmars.D - Invariant -- question #2
- Bill Baxter (11/11) Oct 20 2008 Does using immutable for things that won't change mean that the
- KennyTM~ (4/18) Oct 21 2008 but
- Bill Baxter (5/24) Oct 21 2008 I'm not really sure what the deal is right now. Partly why I was
- Jarrett Billingsley (4/23) Oct 21 2008 Erm... I was going to say "no" but it does indeed compile.
- Lars Ivar Igesund (8/38) Oct 21 2008 It was changed when invariant was introduced to D2 as to make a transiti...
- Jarrett Billingsley (6/8) Oct 21 2008 I can't find anything about it in the changelog, but maybe it was
- Ary Borenszweig (5/14) Oct 21 2008 Does anyone know about
- Denis Koroskin (4/18) Oct 21 2008 Looks like a new/alternative syntax for struct postblitting (works in
- Ary Borenszweig (2/25) Oct 21 2008 Yes, it's exactly that, but I didn't see it announced anywhere.
- Max Samukha (3/28) Oct 21 2008 Isn't it aesthetically repulsive? :)
- Ary Borenszweig (4/32) Oct 21 2008 Well, since struct postblitting is performed when you do:
- Andrei Alexandrescu (3/26) Oct 21 2008 You may want to hold off on that one, we're revamping copy construction.
- Bruno Medeiros (7/25) Oct 22 2008 I read diffs of the DDoc with each new D2 release, and it wasn't
- Bill Baxter (6/31) Oct 22 2008 That reminds me ... the foo.(bar) template instantation syntax was
- KennyTM~ (2/30) Oct 22 2008 No.
- Bruno Medeiros (8/36) Oct 22 2008 It may have been implemented in some experimental internal release, but
- ore-sama (2/3) Oct 21 2008 http://www.digitalmars.com/d/2.0/features2.html
- Jarrett Billingsley (5/8) Oct 21 2008 No, in D1, not in D2. The syntax in D1 used to be invariant {},
Does using immutable for things that won't change mean that the compiler will eventually revert back to accepting the D1 function-like syntax for class invariants? I.e. invariant() { some stuff } Instead of invariant { some stuff } Not a huge deal for me. I was just curious. I seem to remember people saying this was one thing that made it hard to write code that is portable between D1 and D2. --bb
Oct 20 2008
Bill Baxter wrote:Does using immutable for things that won't change mean that the compiler will eventually revert back to accepting the D1 function-like syntax for class invariants? I.e. invariant() { some stuff } Instead of invariant { some stuff } Not a huge deal for me. I was just curious. I seem to remember people saying this was one thing that made it hard to write code that is portable between D1 and D2. --bbbut invariant() { ... } is valid in D1 when D2 was released, isn't it?
Oct 21 2008
On Tue, Oct 21, 2008 at 10:25 PM, KennyTM~ <kennytm gmail.com> wrote:Bill Baxter wrote:I'm not really sure what the deal is right now. Partly why I was asking. It's not a feature I use much, so I'm curious if the DbC fans think it should change back to the original syntax once it can. --bbDoes using immutable for things that won't change mean that the compiler will eventually revert back to accepting the D1 function-like syntax for class invariants? I.e. invariant() { some stuff } Instead of invariant { some stuff } Not a huge deal for me. I was just curious. I seem to remember people saying this was one thing that made it hard to write code that is portable between D1 and D2. --bbbut invariant() { ... } is valid in D1 when D2 was released, isn't it?
Oct 21 2008
On Tue, Oct 21, 2008 at 9:25 AM, KennyTM~ <kennytm gmail.com> wrote:Bill Baxter wrote:Erm... I was going to say "no" but it does indeed compile. In fact the D1 spec even shows it. Walter, why was this never mentioned or announced?Does using immutable for things that won't change mean that the compiler will eventually revert back to accepting the D1 function-like syntax for class invariants? I.e. invariant() { some stuff } Instead of invariant { some stuff } Not a huge deal for me. I was just curious. I seem to remember people saying this was one thing that made it hard to write code that is portable between D1 and D2. --bbbut invariant() { ... } is valid in D1 when D2 was released, isn't it?
Oct 21 2008
Jarrett Billingsley wrote:On Tue, Oct 21, 2008 at 9:25 AM, KennyTM~ <kennytm gmail.com> wrote:It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the TangoBill Baxter wrote:Erm... I was going to say "no" but it does indeed compile. In fact the D1 spec even shows it. Walter, why was this never mentioned or announced?Does using immutable for things that won't change mean that the compiler will eventually revert back to accepting the D1 function-like syntax for class invariants? I.e. invariant() { some stuff } Instead of invariant { some stuff } Not a huge deal for me. I was just curious. I seem to remember people saying this was one thing that made it hard to write code that is portable between D1 and D2. --bbbut invariant() { ... } is valid in D1 when D2 was released, isn't it?
Oct 21 2008
On Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 21 2008
Jarrett Billingsley wrote:On Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:Does anyone know about =this() { } ?It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 21 2008
On Tue, 21 Oct 2008 21:18:22 +0400, Ary Borenszweig <ary esperanto.org.ar> wrote:Jarrett Billingsley wrote:Looks like a new/alternative syntax for struct postblitting (works in DMD2.019, too).On Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:Does anyone know about =this() { } ?It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 21 2008
Denis Koroskin wrote:On Tue, 21 Oct 2008 21:18:22 +0400, Ary Borenszweig <ary esperanto.org.ar> wrote:Yes, it's exactly that, but I didn't see it announced anywhere.Jarrett Billingsley wrote:Looks like a new/alternative syntax for struct postblitting (works in DMD2.019, too).On Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:Does anyone know about =this() { } ?It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 21 2008
On Tue, 21 Oct 2008 15:46:47 -0200, Ary Borenszweig <ary esperanto.org.ar> wrote:Denis Koroskin wrote:Isn't it aesthetically repulsive? :)On Tue, 21 Oct 2008 21:18:22 +0400, Ary Borenszweig <ary esperanto.org.ar> wrote:Yes, it's exactly that, but I didn't see it announced anywhere.Jarrett Billingsley wrote:Looks like a new/alternative syntax for struct postblitting (works in DMD2.019, too).On Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:Does anyone know about =this() { } ?It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 21 2008
Max Samukha wrote:On Tue, 21 Oct 2008 15:46:47 -0200, Ary Borenszweig <ary esperanto.org.ar> wrote:Well, since struct postblitting is performed when you do: foo = bar; =this() makes much more sense than this(this)...Denis Koroskin wrote:Isn't it aesthetically repulsive? :)On Tue, 21 Oct 2008 21:18:22 +0400, Ary Borenszweig <ary esperanto.org.ar> wrote:Yes, it's exactly that, but I didn't see it announced anywhere.Jarrett Billingsley wrote:Looks like a new/alternative syntax for struct postblitting (works in DMD2.019, too).On Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:Does anyone know about =this() { } ?It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 21 2008
Denis Koroskin wrote:On Tue, 21 Oct 2008 21:18:22 +0400, Ary Borenszweig <ary esperanto.org.ar> wrote:You may want to hold off on that one, we're revamping copy construction. AndreiJarrett Billingsley wrote:Looks like a new/alternative syntax for struct postblitting (works in DMD2.019, too).On Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:Does anyone know about =this() { } ?It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 21 2008
Ary Borenszweig wrote:Jarrett Billingsley wrote:I read diffs of the DDoc with each new D2 release, and it wasn't mentioned there, so it was probably unreleased, yeah. I wouldn't be surprised if there was more stuff like that. :P -- Bruno Medeiros - Software Developer, MSc. in CS/E graduate http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#DOn Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:Does anyone know about =this() { } ?It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 22 2008
On Wed, Oct 22, 2008 at 9:44 PM, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:Ary Borenszweig wrote:That reminds me ... the foo.(bar) template instantation syntax was supposedly already implemented. I wonder if that's snuck into this release too? --bbJarrett Billingsley wrote:I read diffs of the DDoc with each new D2 release, and it wasn't mentioned there, so it was probably unreleased, yeah. I wouldn't be surprised if there was more stuff like that. :POn Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:Does anyone know about =this() { } ?It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 22 2008
Bill Baxter wrote:On Wed, Oct 22, 2008 at 9:44 PM, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:No.Ary Borenszweig wrote:That reminds me ... the foo.(bar) template instantation syntax was supposedly already implemented. I wonder if that's snuck into this release too? --bbJarrett Billingsley wrote:I read diffs of the DDoc with each new D2 release, and it wasn't mentioned there, so it was probably unreleased, yeah. I wouldn't be surprised if there was more stuff like that. :POn Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:Does anyone know about =this() { } ?It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 22 2008
Bill Baxter wrote:On Wed, Oct 22, 2008 at 9:44 PM, Bruno Medeiros <brunodomedeiros+spam com.gmail> wrote:It may have been implemented in some experimental internal release, but I got the impression that the whole idea about changing the template instantiation syntax was dropped altogether, so I don't think that's coming out. -- Bruno Medeiros - Software Developer, MSc. in CS/E graduate http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#DAry Borenszweig wrote:That reminds me ... the foo.(bar) template instantation syntax was supposedly already implemented. I wonder if that's snuck into this release too? --bbJarrett Billingsley wrote:I read diffs of the DDoc with each new D2 release, and it wasn't mentioned there, so it was probably unreleased, yeah. I wouldn't be surprised if there was more stuff like that. :POn Tue, Oct 21, 2008 at 11:14 AM, Lars Ivar Igesund <larsivar igesund.net> wrote:Does anyone know about =this() { } ?It was changed when invariant was introduced to D2 as to make a transition path ... I think it was announced too.I can't find anything about it in the changelog, but maybe it was buried in the newsgroups somewhere. W has a habit of not announcing important changes until three months later when he mentions it in passing in a reply as if everyone knew about it.
Oct 22 2008
Jarrett Billingsley Wrote:I can't find anything about it in the changeloghttp://www.digitalmars.com/d/2.0/features2.html
Oct 21 2008
On Tue, Oct 21, 2008 at 1:48 PM, ore-sama <spam here.lot> wrote:Jarrett Billingsley Wrote:No, in D1, not in D2. The syntax in D1 used to be invariant {}, without the parens. The D1 compiler now accepts either the old syntax or the new syntax, and the spec only shows the new syntax, but I don't remember it ever being mentioned.I can't find anything about it in the changeloghttp://www.digitalmars.com/d/2.0/features2.html
Oct 21 2008