digitalmars.D - new DIP2: Const code bloat
- Kagamin (4/4) Jul 09 2009 DiP2 is here. Check it.
- bearophile (5/7) Jul 09 2009 It misses the Author field.
- Andrei Alexandrescu (3/7) Jul 09 2009 Great start!
- Steven Schveighoffer (9/13) Jul 09 2009 Thanks for that!
- Jason House (4/10) Jul 09 2009 that's a great choice for DIP 2. it addresses the really old "return con...
- Kagamin (2/4) Jul 10 2009 Added migration notes.
- Kagamin (2/3) Jul 10 2009 I'm not sure it's an implementation, described it as design details.
- Leandro Lucarella (20/26) Jul 14 2009 It would be very nice if you include at least the abstract in the mail, ...
- Bill Baxter (9/28) Jul 14 2009 e
- Steven Schveighoffer (12/44) Jul 14 2009 Yeah, when I used inout, I was sort of trying to cut off some of the "oh...
DiP2 is here. Check it. http://www.prowiki.org/wiki4d/wiki.cgi?DiPs http://www.prowiki.org/wiki4d/wiki.cgi?DiP2 ps code markup is not very nice.
Jul 09 2009
Kagamin:DiP2 is here. Check it. http://www.prowiki.org/wiki4d/wiki.cgi?DiP2It misses the Author field. Also an optional field for the suggested way to implement something can be positive. Bye, bearophile
Jul 09 2009
Kagamin wrote:DiP2 is here. Check it. http://www.prowiki.org/wiki4d/wiki.cgi?DiPs http://www.prowiki.org/wiki4d/wiki.cgi?DiP2Great start! Andrei
Jul 09 2009
On Thu, 09 Jul 2009 09:46:50 -0400, Kagamin <spam here.lot> wrote:DiP2 is here. Check it. http://www.prowiki.org/wiki4d/wiki.cgi?DiPs http://www.prowiki.org/wiki4d/wiki.cgi?DiP2 ps code markup is not very nice.Thanks for that! I updated the DiP to identify one other important problem that the solution solves: specifying that a function will not alter a parameter *during* the function but allows modification of the parameter through the return value (if the passed in value is mutable, of course). Please update if what I wrote is too confusing, it's hard to word properly... -Steve
Jul 09 2009
that's a great choice for DIP 2. it addresses the really old "return const" issue. We know Walter at one time wanted to solve the issue and we have an official record of Andrei saying it's technically sound. The sample usage should probably include temporary variables inside a function. What are the next steps for this DIP? Kagamin Wrote:DiP2 is here. Check it. http://www.prowiki.org/wiki4d/wiki.cgi?DiPs http://www.prowiki.org/wiki4d/wiki.cgi?DiP2 ps code markup is not very nice.
Jul 09 2009
Jason House Wrote:What are the next steps for this DIP?Added migration notes.
Jul 10 2009
bearophile Wrote:Also an optional field for the suggested way to implement something can be positive.I'm not sure it's an implementation, described it as design details.
Jul 10 2009
Kagamin, el 9 de julio a las 09:46 me escribiste:DiP2 is here. Check it. http://www.prowiki.org/wiki4d/wiki.cgi?DiPs http://www.prowiki.org/wiki4d/wiki.cgi?DiP2 ps code markup is not very nice.It would be very nice if you include at least the abstract in the mail, so it's easier to discuss the DIP here. And as bearophile pointed, the DIP is missing the author. I think a DIP can't be taken very seriously without an author. I think a DIP author should be committed to maintain the DIP (this doesn't mean that other people can't update it) and do the requested changes to make the DIP move forward to its acceptance. As for the DIP itself, I didn't used the const system in D2 yet, so I can't give a good opinion, but I think that adding a new kind of pseudo-constness can be a little bloat. Of course, having to copy the same code 3 times is much worse, so if nobody has a better solution for the problem, I guess I can live with it =) -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- All men are born equal But quite a few get over it
Jul 14 2009
On Tue, Jul 14, 2009 at 7:26 AM, Leandro Lucarella<llucax gmail.com> wrote:Kagamin, el =A09 de julio a las 09:46 me escribiste:oDiP2 is here. Check it. http://www.prowiki.org/wiki4d/wiki.cgi?DiPs http://www.prowiki.org/wiki4d/wiki.cgi?DiP2 ps code markup is not very nice.It would be very nice if you include at least the abstract in the mail, s=it's easier to discuss the DIP here. And as bearophile pointed, the DIP is missing the author. I think a DIP can't be taken very seriously without an author. I think a DIP author should be committed to maintain the DIP (this doesn't mean that other people can't update it) and do the requested changes to make the DIP move forward to its acceptance. As for the DIP itself, I didn't used the const system in D2 yet, so I can't give a good opinion, but I think that adding a new kind of pseudo-constness can be a little bloat. Of course, having to copy the sam=ecode 3 times is much worse, so if nobody has a better solution for the problem, I guess I can live with it =3D)I have to say I read the previous proposals when they were proposed here on the newsgroup, but when I saw the DIP just using a new keyword "vconst" instead of "inout" it looked soooooo much more readable to me. Might just be me, but I think my brain had a hard time convincing my eyes that inout had anything to with const. --bb
Jul 14 2009
On Tue, 14 Jul 2009 12:37:47 -0400, Bill Baxter <wbaxter gmail.com> wrote:On Tue, Jul 14, 2009 at 7:26 AM, Leandro Lucarella<llucax gmail.com> wrote:Yeah, when I used inout, I was sort of trying to cut off some of the "oh no, not another keyword" objections. I tried my *hardest* to explicitly say that the keyword doesn't matter, the proposal still works with any keyword name, but it just doesn't work. People latch onto the keyword like flies on a bikeshed covered with, um.. stuff. I also had another alterior motive in that certain people who seemed to be influential with Walter liked the idea of using inout. I really couldn't care less what the keyword is, because no matter what it ends up being, it is much easier to deal with than writing N copies of a function, especially when the code is identical. -SteveKagamin, el 9 de julio a las 09:46 me escribiste:I have to say I read the previous proposals when they were proposed here on the newsgroup, but when I saw the DIP just using a new keyword "vconst" instead of "inout" it looked soooooo much more readable to me. Might just be me, but I think my brain had a hard time convincing my eyes that inout had anything to with const.DiP2 is here. Check it. http://www.prowiki.org/wiki4d/wiki.cgi?DiPs http://www.prowiki.org/wiki4d/wiki.cgi?DiP2 ps code markup is not very nice.It would be very nice if you include at least the abstract in the mail, so it's easier to discuss the DIP here. And as bearophile pointed, the DIP is missing the author. I think a DIP can't be taken very seriously without an author. I think a DIP author should be committed to maintain the DIP (this doesn't mean that other people can't update it) and do the requested changes to make the DIP move forward to its acceptance. As for the DIP itself, I didn't used the const system in D2 yet, so I can't give a good opinion, but I think that adding a new kind of pseudo-constness can be a little bloat. Of course, having to copy the same code 3 times is much worse, so if nobody has a better solution for the problem, I guess I can live with it =)
Jul 14 2009