From: Jan N. <jan...@gm...> - 2008-12-16 10:49:11
|
In 7 places in the core I find calls like: (void) Tcl_GetStringResult(interp) but interp->result is not used afterwards. I'm refering to tclBasic.c (6) and tclHistory.c (1). Shouldn't these calls have been removed as part of the TIP #330 implementation? If extensions are not allowed any more to access interp->result directly, then those calss serve no purpose other than slowing down Tcl. It might break extensions which still use interp->result, but due to TIP #330, that's exactly what users of Tcl 8.6 should expect. Regards, Jan Nijtmans |
From: Donald G P. <dg...@ni...> - 2008-12-16 14:17:03
|
Jan Nijtmans wrote: > In 7 places in the core I find calls like: > (void) Tcl_GetStringResult(interp) > but interp->result is not used afterwards. I'm > refering to tclBasic.c (6) and tclHistory.c (1). > > Shouldn't these calls have been removed as part > of the TIP #330 implementation? No. TIP 330 called for #define USE_INTERP_RESULT to permit one last path of reprieve for direct access to interp->result. Such code needs to remain present to make that mode work. -- | Don Porter Mathematical and Computational Sciences Division | | don...@ni... Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________| |
From: Kevin K. <ke...@ac...> - 2008-12-16 14:20:39
|
Jan Nijtmans wrote: > In 7 places in the core I find calls like: > (void) Tcl_GetStringResult(interp) > but interp->result is not used afterwards. I'm > refering to tclBasic.c (6) and tclHistory.c (1). > > Shouldn't these calls have been removed as part > of the TIP #330 implementation? If extensions > are not allowed any more to access interp->result > directly, then those calss serve no purpose other than > slowing down Tcl. It might break extensions which still > use interp->result, but due to TIP #330, that's exactly > what users of Tcl 8.6 should expect. If we had made the Tcl_Interp data structure opaque in 8.5, I'd agree with you wholeheartedly. We've moved too slowly on this, and been too quiet about the initial warnings. Since we didn't vote to take out interp->result altogether, I'm a little nervous about taking out the code that makes it useful, particularly since there's not much field experience left (unless Andreas has reported something that I've missed) about what this does to currently fielded extensions. (He maintains the largest extension distribution that I'm aware of.) Andreas, have you tried building the AT extension set against 8.6-post-TIP#330? -- 73 de ke9tv/2, Kevin |
From: Donald G P. <dg...@ni...> - 2008-12-16 14:26:18
|
Kevin Kenny wrote: > it useful, particularly since there's not much field > experience left (unless Andreas has reported something > that I've missed) about what this does to currently fielded > extensions. (He maintains the largest extension distribution > that I'm aware of.) Andreas, have you tried building the > AT extension set against 8.6-post-TIP#330? Relevant to this is the message from Adam Williamson several days ago reporting Tcl package updates for 8.6 for Mandriva: https://sourceforge.net/mailarchive/message.php?msg_id=1228554157.29250.12.camel%40lenovo.local.net -- | Don Porter Mathematical and Computational Sciences Division | | don...@ni... Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________| |
From: Jan N. <jan...@gm...> - 2008-12-16 15:47:30
|
2008/12/16 Donald G Porter <dg...@ni...>: > Relevant to this is the message from Adam Williamson several days ago > reporting Tcl package updates for 8.6 for Mandriva: > > https://sourceforge.net/mailarchive/message.php?msg_id=1228554157.29250.12.camel%40lenovo.local.net OK. Looks too dangerous to do it now, but it definitely should be considered in a future Tcl version. (In my view it doesn't need to wait for Tcl 9, but others might disagree on that) Regards, Jan Nijtmans |
From: Donald G P. <dg...@ni...> - 2008-12-16 15:49:07
|
Jan Nijtmans wrote: > OK. Looks too dangerous to do it now, but it definitely should be > considered in a future Tcl version. (In my view it doesn't need to wait > for Tcl 9, but others might disagree on that) And others might disagree that Tcl 9 is something we will be waiting for. :):):) -- | Don Porter Mathematical and Computational Sciences Division | | don...@ni... Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________| |
From: Alexandre F. <ale...@gm...> - 2008-12-16 15:56:20
|
On Tue, Dec 16, 2008 at 4:48 PM, Donald G Porter <dg...@ni...> wrote: > > And others might disagree that Tcl 9 is something we will be waiting > for. :):):) Indeed :) I'd be happy with a Tcl freezing in 8.x, without a new quantum leap. And then rule for 1000 years. Just like the Bourne Shell has been frozen for eons, and will rule longer than mankind. -Alex |
From: Jan N. <jan...@gm...> - 2008-12-16 16:07:54
|
2008/12/16 Alexandre Ferrieux <ale...@gm...>: > I'd be happy with a Tcl freezing in 8.x, without a new quantum leap. > And then rule for 1000 years. Just like the Bourne Shell has been > frozen for eons, and will rule longer than mankind. Then how do you explain the existance of bash (Bourne Again Shell?) ..... ;-) (I shouldn't continue this discussion, just couldn't resist answering that.......I don't really expect an answer..) Regards, Jan Nijtmans |
From: Adam W. <awi...@ma...> - 2008-12-24 02:36:14
|
On Tue, 2008-12-16 at 11:49 +0100, Jan Nijtmans wrote: > In 7 places in the core I find calls like: > (void) Tcl_GetStringResult(interp) > but interp->result is not used afterwards. I'm > refering to tclBasic.c (6) and tclHistory.c (1). > > Shouldn't these calls have been removed as part > of the TIP #330 implementation? If extensions > are not allowed any more to access interp->result > directly, then those calss serve no purpose other than > slowing down Tcl. It might break extensions which still > use interp->result, but due to TIP #330, that's exactly > what users of Tcl 8.6 should expect. (after writing this i see that DGP already did, but to add weight, I'll send it anyway). FWIW, I'm against this. The current state of #330 is that 8.6 explicitly allows a 'hack' to re-enable interp->result, as a transitional measure, and it is stated that 9.0 will remove any possibility to use interp->result. Thus changes that would break the use of interp->result should only be done in 9.0, not 8.6. In practical terms, for the Mandriva 8.6 migration, I could not properly fix some obscure Tcl packages not to use interp->result, not being a strong enough coder, so I had to use the hack to re-enable it for those packages. If it stops working it'd cause me rather a bit of inconvenience as I have to either a) learn enough to fix that code myself or b) find someone else to do it. I was rather counting on having the time until the 9.0 release to do that, not having to try and get it done for 8.6. -- adamw |
From: Jan N. <jan...@gm...> - 2008-12-27 22:53:33
|
2008/12/24 Adam Williamson <awi...@ma...>: > FWIW, I'm against this. The current state of #330 is that 8.6 explicitly > allows a 'hack' to re-enable interp->result, as a transitional measure, > and it is stated that 9.0 will remove any possibility to use > interp->result. Thus changes that would break the use of interp->result > should only be done in 9.0, not 8.6. Don´t worry! The reactions convinced me of the same. However, in the mean time I was thinking about a better way to keep the current contract, and still improve the curent duality between interp->result and interp->objResult. This idea, in short, is a new object type "dstring", which is nothing more than a DString wrapped in an object. We can simply change Tcl_GetStringResult() such that it modifies the current objResult type to be a "dstring". Then we simply let interp->result point to de dstring of interp->objResult and the two versions point to the same. It would simplyfy a lot other functions as well, like Tcl_AppendResult or Tcl_ObjPrintf, and it can be made such that all StringResult functions keep the current behavior, only it prevents the constant conversion between string and Tcl_Obj. Anyway, it's just an idea that has to be worked out further, maybe for Tcl 8.7 (maybe not). Regards, Jan Nijtmans |