| Store | Cart

Re: [TCLCORE] CFV: TIPs 351 and 475

From: Dipl. Ing. Sergey G. Brester via Tcl-Core <tcl-...@lists.sourceforge.net>
Thu, 22 Feb 2018 10:39:23 +0100
 

Hi, Don. 

I saw the same reasons for No, but I could not put it so precise as you.
:)

One question I still have - should we really use completely new
bytecode-instruction for the insert, 
doing almost the same as the string replace (INST_STR_REPLACE)?
Even if there is the common routine now, that used for both processes.

I mean would be possibly my continuation of this branch better eligible
for the TIP?

Which holds TEBCresume more slim and saves one (single-byte) instruction
slot for more important 
things in the future.
Additionally this way it will be better compiled as well as more
suitable for the execution 
on modern CPU's like execution prediction, speculative multithreading
(SpMT resp. TLS), etc.

Regards,
Serg. 

Am 21.02.2018 23:43, schrieb Donald Porter: 

>> TIP 475: Add [string insert] Command and C API> > TIP 475: NO> > As I demonstrated in an earlier message, the specified C routine interface> Tcl_ReplaceObj() isn't well structured to serve all callers well.> > I've made some progress on the core-8-branch briningg the internal> C routines that implement [string foo] commands into a common> pattern> > Tcl_Obj *TclStringFoo(interp, string, ..., flags);> > where flags includes the values TCL_MATCH_NOCASE (already used)> and the new value TCL_STRING_IN_PLACE to signal that in place operations> should be performed if sharing permits it. > > My plan is to follow the pattern and propose the alternative> > Tcl_Obj *Tcl_StringReplace(interp, string, start, remove, insert, flags);> > I haven't got that done yet. I think that's the way we should go, and I> think the currently proposed interface is worse enough we'll be sorry> we accepted it. So I say NO to accepting it.> > Note that while pursuing this normalizing of routines that do string> operations, I was reminded that the limits on what we can o are> tied up in how strict we are about the encoding of strings that reach> our internal structures. I think it's time to consider ending the remaining> forgiveness embedded in string interpretation that treats invalid UTF-8> as ISO-8859-1 in some situations. This might be taken up as part of> developing Tcl_StringReplace(), or might be factored off as a separate> development step to come either before or after.> > DGP> > ------------------------------------------------------------------------------> Check out the vibrant tech community on one of the world's most> engaging tech sites, Slashdot.org! http://sdm.link/slashdot [1]> _______________________________________________> Tcl-Core mailing list> Tcl-...@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/tcl-core [2]
 

Links:
------
[1] http://sdm.link/slashdot
[2] https://lists.sourceforge.net/lists/listinfo/tcl-core

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Recent Messages in this Thread
Kevin Kenny Feb 21, 2018 03:22 am
Kevin Kenny Feb 21, 2018 05:47 pm
Brian Griffin Feb 21, 2018 06:13 pm
Donald Porter Feb 21, 2018 10:43 pm
Dipl. Ing. Sergey G. Brester via Tcl-Core Feb 22, 2018 09:39 am
Donald G Porter Feb 22, 2018 05:20 pm
Donald G Porter Feb 22, 2018 05:00 pm
Kevin Kenny Feb 22, 2018 06:20 pm
Alexandre Ferrieux Feb 22, 2018 09:16 pm
Dipl. Ing. Sergey G. Brester via Tcl-Core Feb 22, 2018 08:41 pm
Jos Decoster Mar 01, 2018 07:36 pm
Steve Landers Feb 21, 2018 11:58 pm
Harald Oehlmann Feb 22, 2018 07:06 am
Andreas Kupries Mar 01, 2018 05:41 am
Messages in this thread