From: SourceForge.net <no...@so...> - 2005-01-04 16:16:03
|
Bugs item #1092508, was opened at 2004-12-28 21:34 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1092508&group_id=10894 Category: 75. Tutorial Group: development: 8.5a3 Status: Closed Resolution: None Priority: 5 Submitted By: Don Porter (dgp) Assigned to: David N. Welton (davidw) Summary: Tutorial implies false quoting requirements Initial Comment: In its earliest lessons and examples, the tutorial implies quoting requirements that do not exist. Page: http://www.tcl.tk/man/tcl8.5/tutorial/Tcl2.html includes the example: set fruit "Cauliflower" In the next page, the example includes: set Z "Albany" The "..." quoting is legal, but not necessary. Using this quoting style in the first examples of Tcl commands strongly suggests the quoting is necessary. This kind of misimpression early on can lead to faulty beliefs that "..." quoting creates a "value", or that {...} quoting creates a "list". Better to learn early on (both explicitly and by implication) that Tcl's syntax rules determine word boundaries and substitution. No more; no less. I believe this quoting style is one favored by the TclTutor author as a way to indicate programmer intent regarding values vs. variable names. It's a fine coding convention to introduce later on once the precise syntax requirements of Tcl are well established. I think the early lessons in the tutorial should make use of only necessary syntax to avoid any confusion about what Tcl requires vs. what some coding convention recommends. ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2005-01-04 11:16 Message: Logged In: YES user_id=80530 I don't see the change. Does something need to be done to publish the change on the www.tcl.tk web site? ---------------------------------------------------------------------- Comment By: David N. Welton (davidw) Date: 2005-01-04 09:02 Message: Logged In: YES user_id=240 I added an example like this: puts HelloWorld in the first chapter, and changed some of the others to not use quoting. Have a look and see if you think it's adequate. I'm going to go ahead and close the bug, but I'd be happy to add some more. ---------------------------------------------------------------------- Comment By: David N. Welton (davidw) Date: 2004-12-29 17:53 Message: Logged In: YES user_id=240 I usually use quotes for consistency's sake, but you are indeed correct that people should be shown early on that Tcl is different this way.... you dont' *need* the quotes if you don't have any spaces. ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2004-12-28 21:37 Message: Logged In: YES user_id=72656 While I agree that quoting should be addressed early on (as continued use of "" can lead a person into quoting hell by accident), I should note that I use ""s often where "not necessary" simply because my editor will color it nicely, which is appropriate in context. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1092508&group_id=10894 |