3 ms·
I dislike that too about most of the languages which are in some way white-space sensitive. (Python as the go-to worst example, but other modern languages wher
by mjevans 5y ago
I dislike that too about most of the languages which are in some way white-space sensitive. (Python as the go-to worst example, but other modern languages where ; or a statement termination value is optional also fit.)
Newlines only can work, but then the question revolves around implicit newline escapes (if there's an unclosed statement) versus a required escape and things can quickly get out of hand and readability if really long strings need to be passed around; like with nightmare long SQL queries or default / example config file blocks.
- tyingq 5y agoIt's a bit odd, because you can skip newlines in many cases. This works: #!/usr/bin/tclsh set foo [ lindex [ expr 2 * 3 ] 0 ] puts $foo