The code formatting style used for Tcl programs as reflected on the man pages and elsewhere is similar to C Code formatting.
After reading (once again) '1% the code' [L1 ] and while writing (once again) a medium size Tcl application i started to think, that there are to many braces in the files. Python [L2 ] does without them, however Python lacks nice Syntax at other points, I won't discuss this here.
Some rules:
Some recomendations:
(well, that was just one)
Examples:
proc ccfs param { if !$param return puts "we are in" if [llength $param] { puts "and we've got a list"} switch -- [lindex $param] { stop {return} continue { # test the second parameter set test [lindex $param 1]} default {puts "don't know what todo with: $param}}} if {$test eq "stop"} { puts "we stopped on the second param"}} proc ccfs1 {varA varB} {...}