logoalt Hacker News

BoingBoomTschaklast Saturday at 10:46 PM0 repliesview on HN

I understand where they came from here: the Scheme-like obsession with purity (the enshrined Endekalogue, now Dodekalogue) didn't mesh very well with traditional comment.

Yeah, Tcl has its design warts, but I don't think it has that many remaining that can't be fixed via metaprogramming. Even the popular Python manages to frustrate me with its idiotic statement/expression divide (they doubled down by making match() a statement...) and constant need to convert between generators/iterables and lists.

Thing is that R6RS Scheme (or R7RS-large if it comes out one day) is basically a better Tcl if you only consider scripting and don't need the event loop. If Tcl had played its cards right, it'd have competed with fish/rc/nushell/powershell instead, it was really ready to be a better shell well before any other.

------

To be honest, Common Lisp is the only language I've ever seen get this right without compromising on said purity by specifying the reader (parser): https://www.lispworks.com/documentation/HyperSpec/Body/02_.h...

Comments are then just the result of a readtable entry like any other, allowing this kind of voodoo:

  ; A comment
  (set-macro-character #\% (get-macro-character #\;))
  % Also a comment