3 ms·
I think the main issue is that talking by trivial examples does not communicate a coherent syntax. The audience can imagine completely different corner cases wh
by saltcured 4y ago
I think the main issue is that talking by trivial examples does not communicate a coherent syntax. The audience can imagine completely different corner cases when they fill in the gaps differently than how you intended.
I don't think your example looks very s-expressiony with the FROM keyword in the middle of the sequence. To me, s-expr means the keyword in the first slot labels the form to interpret the rest of the sequence. The outer form should either have positional slots to implicitly interpret each part by different rules or an unordered set of slots that will each have their own labeled form. Consider instead something like:
;; (QUERY select from where)
(query (e1 e2 ...) (r1 r2 ...) (e1 e2 ...))
;; (QUERY parts...)
(query (select e1 e2 ...) (from r1 r2 ...) (where e1 e2 ...) ...)
Also, existing SQL syntaxes have some places where parenthesis has a special syntactic purpose and others where it is optional. It is rather convoluted to define unambiguous parses for some of these. For someone familiar with any of this, it would be hard not to bring in false assumptions about how a hybrid language would work that brings in parentheses for other structuring purposes.