Closed popematt closed 1 month ago
Something like this can solve both of those complaints.
Macro | Expression Group | |
---|---|---|
E-Expr | (:foo) |
(:: foo) |
TDL | (;foo) |
(;; foo) |
Although the use of ;
for macros is unexpected, and ;;
looks rather jarring. Using a different operator symbol character as the sigil in TDL could be easier to read. E.g.:
Macro | Expression Group | |
---|---|---|
E-Expr | (:foo) |
(:: foo) |
TDL | (.foo) |
(.. foo) |
Though not as lisp-y, the .
operator has some precedence in popular programming languages for invoking methods, so this usage will not be completely foreign to people learning TDL.
As a side-effect of this change, we would no longer need to escape s-expressions in TDL (see #343). If we need a s-expression that starts with .
we only need to wrap the .
in a literal
clause.
Resolved in #351
Multiple early users and implementers have complained about the expression group syntax. The distinction between
(:foo)
and(: foo)
is easy to miss. Also, there is asymmetry between this and the TDL equivalents—(foo)
and(; foo)
respectively.