lreverse.c implements lreverse as a extension. The two
function could easily copied to Tcl's core. (I'm not
an expert on TCL internals). I used this extension for
some time.
I was planning to do a clean-room reimplementation. It's not
hard to do in the first place, and code inside the Tcl core
gets to play fast-and-loose with some of the constraints
leading to quicker overall code.
(The [string reverse] implementation will be more
interesting as there are some tricky cases involved.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=79902
I was planning to do a clean-room reimplementation. It's not
hard to do in the first place, and code inside the Tcl core
gets to play fast-and-loose with some of the constraints
leading to quicker overall code.
(The [string reverse] implementation will be more
interesting as there are some tricky cases involved.)