Actually, I think its syntax isn't just simple, it's simplistic. It's simple to implement, but it presents some rather unexpected behaviour to the user. To wit:
proc hello {} {
# I'd like to put an unmatched { in my comment
puts "Hello!"
}
This doesn't compile because of the unmatched {.
But this does, by adding another unmatched } - in the following string:
proc hello {} {
# I'd like to put an unmatched { in my comment
puts "Hello!}"
}
In other news, Richard P. Gabriel can stop arguing with himself about whether worse is better. In this case, worse is pretty silly!
Nagelfar can easily find these types of errors, plus you should be able to define syntax for your own commands (as in your previous comment.)
tclsh nagelfar.tcl engtech.tcl
Checking file engtech.tcl
Line 1: E Wrong number of arguments (5) to "proc"
Argument 4 at line 2
Argument 5 at line 2
Comments are warty in Tcl, you would be better off to understand Tcl's syntax conventions, rather than assuming comments work like other languages. See item #10 at: http://wiki.tcl.tk/10259
The question is not "How can I put an unmatched curly bracket in my comment?"
The question is "Why are the semantics of the language - including, but not limited to brace matching - so peculiar and unexpected?"
Look at my second code example! The matching brace is in a string, in another command, on the next tine! And it works! And removing either one breaks the code!
But this does, by adding another unmatched } - in the following string:
In other news, Richard P. Gabriel can stop arguing with himself about whether worse is better. In this case, worse is pretty silly!