3 ms·
This business falls into the "well that's handy" followed by the "who in the world thought honoring continuation characters in comments was a good idea?!"
by mdaniel 7y ago
This business falls into the "well that's handy" followed by the "who in the world thought honoring continuation characters in comments was a good idea?!"
#! /bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" ${1+"$@"}
This page is just filled with wow:
https://wiki.tcl-lang.org/page/comment https://wiki.tcl-lang.org/page/comment
with an especial nod toward:
set two [1 + 1] ;# line comment needs a statement terminator
- williadc 7y agoOne of the world's largest hardware companies uses the line continuation feature to help make stuff you've almost certainly used today. Whether that is the best way to solve their problem is another story, but that feature does get used.
- lanstin 7y agoAnd the nice thing about TCL as a language is there's just like 3 or 4 rules to remember and then you can embed the parser in your head. # is a command that discards all its arguments. So it's in the normal flow of syntax, so line continuation works. It's odd to see but easy to reason about after you are used to it.