my e-mail address [email protected]

background :
Graduated engineer in 2001 and working the railway industry. I support engineering tools based on Tcl/Tk since several years (refer to the 2009 Tcl conf in Strasbourg)

interests :
My concern is to put forward the Tcl/Tk language to make it less confidential and more widely used as it is a fabulous language for tools in the engineering area.

HE 2022-04-09: Hello Adrien, I see you are changing a lot of code inside this wiki and I ask myself why you are doing it? What is the reason to change it?

What I see is that you change foreach with lassign without need, even breaking code in some cases. 'foreach' works well even with Tcl 8.6 to assign list elements to variables. On the other hand Tcl 8.4 doesn't support 'lassign' native. And some code claims to run with Tcl 8.4.

You also change "trace variable" to "trace add variable". Again, the old way still works today.

If your purpose is to make the code using modern Tcl commands, than it is interesting that you not change other parts like using 'eq' for comparing strings in expression. There are examples near by the changed code. That leads me to the conclusion that you changed the code with some kind of pattern search without looking inside the code to assure that it really runs as expected.

This conclusion is supported by the fact that you not documented the change on the edited pages. Not as comment somewhere on the page nor with a comment inside the code. That means you change code silent and it looks on the page like as the original editor has written the code like that. That is not the nice way, from my point of view.

If your purpose is to take care about making code modern, why you not rework the scripts completely and add an updated version with a meaningful comment in addition to the page.

We are not speaking about syntax errors, typos or bug fixes which everyone is glad if one takes care about.

Even if Tcl 8.4 is no longer a maintained native Tcl version, you should also kept in mind that there are still 8.4 syntax out there. For example jTcl is still using Tcl 8.4 syntax.

I can confirm that "it is a fabulous language for tools in the engineering area.". But, one of its strength is, that Tcl is stable in syntax for such a long time. That mean you can keep the Tcl installation up to date without breaking running scripts. One of my Tcl programs runs since 2006 without need of a change. And that is what I expect as an engineer from my tools that I not have to maintain them regularly because commands or syntax have changed. And I believe, that this should be shown also in this wiki to convince other to use our preferred programming language.

APE 2022-04-09: Hello HE, first thanks for your remarks ! Looking for some inspiration from the wiki, I tried to look at it from a new user point of view. There are so many interesting things, but also lots of dead links or some tricks like the "foreach {...} {break}" to assign variables. This one can be confusing, especially if used inside a real loop (foreach, while, for), and Tcl8.5 defined nearly 15 years ago the "lassign" command for this purpose. I didn't think updating this could cause some harm. I tested quickly the modification when possible using the "copy code" button. I also didn't think this deserved extra comments in addition to the history of page, because of quite minor edit. Intention was just to make some parts more understandable for users, who will likely use recent versions of Tcl. The "trace variable" command is deprecated, and in some Wiki pages both deprecated and current versions were used, so I updated it in some pages. But I might misjudged it, and have no pb to get that back to previous page version, or add comments, if necessary and learn how to be a better contributor. Alltogether, it can also put in light a discussion about versions of Tcl with potential incompatiblities : is it the case with versions 8.7 and 9.0 ? How to handle this in wiki ?

HE 2022-04-09: Hello Adrien, I can see at least 60 pages you changed where you would be able to add comments;-) Anyway, the future counts.

I heard the argument "new user" not the first time as an argument to change existing code without notice. It is still wrong. New user should know that there are more than one way to do the work. They will find exact that in the wild world. To change all code in wiki to the latest Tcl version simply means delete the history and lead to a useless wiki because the real world is different.

A newbie would use and need good up to date books and tutorials. And it helps that this wiki has so many pages explaining things.

The problem of incompatibility happened in the past and will happen in the future. It is not possible to change all the code in the wiki (or in the world) to the always latest stable version. More important this will hide incompatibilities for people searching for a solution for a real world problem. Keep in mind that syntax 8.3 (Cisco) and 8.4 (jTcl) are still out there. Even one of my programs, running 24/7 is still written in 8.4 syntax. The best I can imagine for the wiki is:

  • That every code publisher marks his code in a way that it shows for which Tcl version it is written originally.
  • That people interested in that peace of code make it running if it is broken and document what they did.
  • That people write hints about used code and where alternatives are possible in the discussion section.
  • That people invest time to maintain more pages which explains usage and different variants even for different Tcl version.
  • That "what is new" documents can be found in that wiki. Poorly the best pages for 8.5, 8.6 and 8.7 are not inside the wiki.

And the most important: Inside 8.x we should avoid backwards incompatibility.

APE 2022-04-09: Hello HE, Ok understood! I reverted pages back to previous version.

PYK 2022-04-11: In my opinion, code on the wiki should reflect modern Tcl, not ancient versions of Tcl that are no longer even supported. The wiki is not the place to try to manage forks and branches of code. Rather, it is a place for people to learn by reading examples and finding references to further relevant information. Attempting to maintain various versions of code on wiki pages just to show 8.4 syntax vs 8.6 syntax leads to too much visual cruft. The wiki already provides page history as the mechanism for recording older information and making it available to those who care to dive into it. There's no reason to keep everything visible on the current version of the page. If people really want access to older versions of scripts, perhaps a source code repository can be established for that purpose, with references to it on the relevant wiki pages. On many pages there is a "Changes" section where one can document what updates have been made to code examples, but often even that is unnecessary. Sometimes it is useful to leave a link to an older version of a page in such a note. Recently I have been reviewing APE's changes as he makes them, welcome replacement of foreach with lassign, and encourage him to continue to make other edits that reduce friction in reading modern Tcl scripts. Furthermore, I encourage APE and other editors to be bold in making changes that improve the readability of code and text. Be bold! Superfluous comments and useless conversations can be deleted, and content can be drastically reorganized so that it's more readable. However, anyone engaging in making larger changes must take extreme care not to lose any bit of useful information. I've reinstated APE's changes.

HE 2022-04-13: PYK and other interested reader, my answer is on Poor Yorick not to need to discuss with PYK on different places.