Talk:Tcl/Archives/2012/October

Fix Technically-Incorrect Language
Suggest fixing the technically incorrect language "rather unique." Something is either unique or it's not.

Yeah. I fixed it, and a few other non-native-englishisms. I think the page could do with a lot more polish, however. (yes, that *is* a pun)

NPOV?
I don't think there's a single sentence in this article that even remotely tries to address any criticism of the tcl language. ALl things have pros and cons yet this article makes no effort to address those in the context of tcl... I think we should put up one of those NPOV wikipedia headers until someone addresses this article from the other side.

--129.85.41.250 18:32, 27 July 2006 (UTC)
 * This article is about the TCL language, and as long as it correctly describes the language's syntax/features then it's neutral. If any valid criticisms exist then they can be added. They must also include references to promminent sources, otherwise it would be an "original research" violation. The exclusion of criticisms does not make it POV since this is not a "TCL Criticisms" article. I've removed the NPOV tag. Spookfish 10:54, 28 July 2006 (UTC)


 * It should be noted that some other programming language pages (e.g. Perl, Python) do not have criticism sections, while others (e.g. Ruby) do. Without a general rule, I favour leaving things alone for now (and the NPOV claim hardly stands overall, even if some parts of the text could stand a bit more cleaning up). Donal Fellows 14:34, 15 September 2007 (UTC)

Digital clock
The Digital clock example gives the error: invalid command name "label" --Peak Freak 17:56, 13 Apr 2005 (UTC)

You forgot "package require Tk" or using /usr/bin/wish as the interpreter.

--Ethouris


 * Fixed Donal Fellows 18:28, 16 September 2007 (UTC)

Various
1. I think it is improper to write examples, which require Tk package. These should be added to the description of Tk.

2. Symbols: you forgot the :: symbol to manage namespaces and global variables.

--Ethouris 19:26, 14 Apr 2005 (UTC)

Some evidence needed for a statement
The feature list has following statement: "Easy to maintain code. Tcl scripts are often more compact and readable than functionally equivalent code in other languages." Where is the evidence for this statement? Without good evidence I would suggest to remove that statement. --shd

Command evaluation: I don't get it
from the article: The subcommand is evaluated first and the result is substituted as the argument. Alternatively, any argument placed in curly braces will not be evaluated, but rather will be handed directly back to the orginal command as an argument.

I don't understand: "handed directly back to the orginal command as an argument" should the sentence be rewritten? ori 10:52, 16 August 2005 (UTC)


 * If I have

commandWord [anotherCommandWord arg1 arg2]

the command within the square brackets gets evaluated and its result is given to commandWord as argument.

If I have

commandWord {aWord aSecondWord aThirdWord}

the content within the curly brackets will be handed as a list as one argument to commandWord. I hope this helps.Hirzel 11:02, 16 August 2005 (UTC)


 * very helpful actually. shouldn't we add (change) it to the article? ori 12:17, 16 August 2005 (UTC)

Scope not dynamic
One of the listed features is dynamic scope. Tcl's variable are in fact lexically scoped; consider these two procs:

proc foo {} { set a 1 bar } proc bar {} { set a } % foo can't read "a": no such variable

In a dynamically scoped language (such as Perl 4 or Emacs Lisp), the variable  would be visible and defined during evaluation of. In a lexically scoped language (such as C or Python) it wouldn't. Tcl's variables are lexically scoped by default, with the programmer given the ability to communicate with the enclosing scope using   and.

If no one objects, I'll remove the dynamic scope bullet and add something about upvar/uplevel. Hniksic 15:17, 29 August 2005 (UTC)

In my understanding, lexical scoping means "getting the values at definition time", while dynamic scoping means "getting the values at runtime". You are right that variables inside functions are by default local, but with upvar you can retrieve variables higher up in the call stack *at runtime* - that's why I'd still defend (potential) "dynamic scope". http://wiki.tcl.tk/2775 demonstrates in 13 lines of code how it can be implemented. Suchenwi 17:35, 7 March 2006 (UTC)


 * Obviously, the values need to be obtained at run-time in both cases, otherwise the variable would effectively remain constant. The question is where to look for the value.  Lexical scope refers to the variable being accessible only inside the lexical block where it is defined, which means that functions don't see it.  This is indeed the case in Tcl, as shown with the above example.  upvar is misleading because it is a mechanism for *explicit* reference-passing to other functions, akin to C's pointers.  That is why existence of upvar doesn't make Tcl dynamically scoped, just like the existence of pointers doesn't make C dynamically scoped. 194.152.226.5 12:56, 15 September 2006 (UTC)


 * Tcl is dynamic scoped in the sense that frames that store local variables for procedures get built in the prologue of an procedure and torn down again in the epilogue of the procedure. Similiar to C local variable stackframes. While with lexicaly scoped languages an pointer to the current frame is saved with an procedure when it is defined. (See http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-21.html#%_sec_3.2)
 * The upvar command only maps an place of an variable in an frame to a name of an variable in the current frame. I hope this clears up any missunderstanding. Zarutian (talk) 13:52, 14 March 2008 (UTC)

Uplevel and upvar
The page doesn't mention uplevel and upvar, which are distinct features of Tcl not found in other languages. If no one objects, I'd like to add a section about them. (They might even be covered by a separate page because they're quite interesting from a language design and studying perspective and can be accompanied by illuminating examples.) Hniksic 15:26, 29 August 2005 (UTC)

As I understand it, upvar provides functionality somewhat like call-by-name, and as such it is a very sophisticated mechanism. Compare and contrast with call-by-value (how Tcl commands work by default) and call-by-reference (not used in Tcl at all), which are the dominant argument passing mechanisms in most programming languages. I've started a page on uplevel but more input from others would be welcome. ''- Donal Fellows. 10:50, 05 September 2005''

Infobox
Maybe this article should have an infobox like the Perl one.

Update: there is an infobox now, but no logo. Plenty of logos here: http://www.demailly.com/tcl/about/logos.html


 * Logo taken care of (about time!)... Timbaland 03:43, 27 December 2006 (UTC)


 * It's a shame that we're not using the official logos (actually distributed as part of Tk as it happens) which are BSD-licensed. But the current picture isn't bad either. Donal Fellows 14:18, 15 September 2007 (UTC)

Eggdrop
Can someone throw something into the article about Eggdrop.. what I believe to be the main use of this language. &mdash; D e on555talkReview 02:29, 19 October 2006 (UTC)

Actually, the major uses seem to be in GUIs, Electronic Design Automation, and system testing. 82.42.250.222 00:35, 9 January 2007 (UTC)

There are also some major web applications, such as AOLServer (http://www.aolserver.com/).Bill 08:07, 8 July 2007 (UTC)

Eggdrop is notable, forsure. 23:46, 24 June 2007 (UTC)23:46, 24 June 2007 (UTC)

Eggdrop seems esoteric to me and is not by any stretch the main use of the Tcl language. The main use of Tcl in industry, as measured by any metric (lines of code, number of working programmers, number of installation) is for the purpose of creating and running test harnesses for hardware, software, and firmware. User:Bwolmarans2 January 2010 PST. —Preceding undated comment added 06:55, 27 January 2010 (UTC).


 * There are many different communities that use Tcl, and I'd be very reluctant to claim that one is more or less notable than the others. It all depends on what one's personal situation is. FWIW, another major use is in embedded systems and routers. The real key to my statement is that there's very little overlap between these communities; people who use Eggdrop probably don't use AOLServer, and the EDA crowd is distinct again. Given that, I can't really exclude Eggdrop. (Any list of notable uses of Tcl should be alphabetic of course...) –12:24, 29 January 2010 (UTC) —Preceding unsigned comment added by Dkf11 (talk • contribs)

Meaning of implementation
Is the description of ActiveTcl as being a major implementation of Tcl correct? I would rather consider ActiveTcl as a distribution of Tcl, whose underlying implementation is provided by the tcl.sourceforge.net project. http://wiki.tcl.tk/17975 lists a number of other implementations. 81.231.34.187 15:57, 18 July 2007 (UTC)

Hello World
Where's the "Hello World" example? —Preceding unsigned comment added by 82.9.222.248 (talk) 17:04, 10 November 2007 (UTC)


 * Are you suggesting that it's customary for every programming language page to have a 'Hello World' example? Timbaland (talk) 03:48, 24 November 2007 (UTC)

I added one, as first example in the Syntax chapter. - Suchenwi (talk) 12:48, 14 March 2008 (UTC)

Code Syntax Highlighting
Folks, I (somewhat) rejuvenated the Tcl wiki by adding syntax highlighting to all presented code blocks (about time!). The problem I'm having is that the CSS lib in charge of coloring the Tcl syntax isn't quite proper. For example,

1) Some commands use different colors (which leads to inconsistency): 2) Some commands haven't been defined at all:

My question, who do I need to contact to get this syntax template up to date? Timbaland (talk) 03:34, 24 November 2007 (UTC)
 * Look at Special:Version: MediaWiki uses the SyntaxHighlight extension, which uses GeSHi Highlighter. Follow the white rabbit! -- skiidoo (talk) 16:19, 24 November 2007 (UTC)
 * Thx skiidoo; I'll make sure to take the red pill before chasing down that rabbit ;) Timbaland (talk) 07:23, 26 November 2007 (UTC)

Citation Needed?
The statement "...Generally considered easy to learn..." needs a citation? Wha? "Sunshine on one's shoulders is generally considered to be pleasant" would also need a citation. Relative ease of learning should either not be mentioned, or should be a "Duh" statement that does not require a citation based on the simple syntax and limited number of commands.

131.191.54.201 (talk) 23:50, 29 November 2007 (UTC)

Interfacing Tcl with C
Interfacing Tcl-Tk with C++ is mentioned albeit very shortly but there is no mention whatsoever of interfacing Tcl-Tk with C and that's a shame! -- Robert Abitbol —Preceding unsigned comment added by 172.163.244.97 (talk) 05:48, 30 March 2008 (UTC)


 * I agree. At least critcl and SWIG should be mentioned, and I believe there is also some documentation on extending Tcl by simply adding commands to it's C source, which has always been open. 76.246.149.216 (talk) 03:12, 31 March 2008 (UTC)

Example of echo server does not work
When I just copied and pasted the Echo Server example, it didn't work. After some experiments I found out that removing the option -nonewline creates a functional echo server. I used the $ telnet to check it..

ChardonnayNimeque (talk) 19:06, 5 April 2008 (UTC)

Safe tcl
On the list of missing encyclopedic articles, letter "S", is an entry for "Safe-tcl". Would it be possible for an expert in the language to give a brief discussion on safe-tcl so that we can redirect the subject heading to here? Thank you!&mdash;RJH (talk) 20:44, 14 April 2008 (UTC)

Release History
Anyone fancy adding the release history? I've not got time atm, although I may do it at a later date if nobody carries the flag. --Hm2k (talk) 10:32, 18 February 2010 (UTC)

Logo
The current logo in use on this article does not appear to be the an official logo. There's little detail where this new logo came from and why it is being used. It should be replaced with an official logo, or at least one that uses the correct colours... --Hm2k (talk) 13:33, 25 May 2010 (UTC)

Web Interfaces for Tcl
Are there any extended tcl tools for web interfacing —Preceding unsigned comment added by 122.160.177.66 (talk) 10:31, 28 May 2010 (UTC)

Paradigm
The programming language description box states that one of Tcl's paradigms is "functional programming". I don't think that Tcl is funcitonal at all, in fact ,it has no difference from other imperative languages such as C++ in this particular issue. Although you can program in a functional style, it still doesn't define this language as a "function" one. See functional programming. Reisin (talk) 01:16, 21 July 2010 (UTC)
 * The general rule of thumb for allowing a programming language to call itself "functional" as well as other things (which is slightly distinct from saying it's a primarily functional language) is whether it can form closures. The residents of the Tcl Wiki seem to think it can, therefore it's loosely capable of functional programming (it also makes sense in the context that Tcl is often accused of being a Lisp).
 * Of course, I won't get in your way if you want to remove it for lack of citation. Leushenko (talk) 15:50, 22 November 2010 (UTC)

TclOO and Tcl 8.6 Beta
There is no mention of TclOO which is intended to be the 8.6 object-oriented framework for Tcl. It has been stalled in a Beta 1 release for many months now. It can be thought of as an alternative to both incr and XOTcl.

Tcl 8.6 is also supposed to mean the transition to a new VM so we should at least be preparing some notes on this - unless the effort is stalled due to a fundamental design flaw.

One question I would ask is whether TclOO offers the equivalent of Traits as now used in Pharo Smalltalk and Scala (Traits are from the Self offshoot of Smalltalk-80.) Traits are an alternative to abstract classes, Mixins and AOP. They would seem to be one of the important lessons of of more than 30 years of OOP and as a preferred mechanism for separation of concerns in O-O design. 142.167.171.199 (talk) 23:59, 23 February 2011 (UTC)