Yes, being able to start with FROM is what makes this so intuitive to use (and autocomplete work better); your hypothetical
FROM r JOIN s on r.Id = s.Id ORDER BY r.Id SELECT *
would indeed be pretty much that (linebreaks optional):
FROM r JOIN s on r.Id = s.Id
|> ORDER BY r.Id
|> SELECT *
The question about “typing one more character” is answered in the paper's section 4.1.5 “Why use ‘|>’ for the pipe character?” (page 6): “The most natural and obvious choice would be to use ‘|’. Unfortunately…” — they don't want to break existing queries that use | for bitwise OR.
(I wonder if one day, if the majority of users are using pipe syntax and don't mind updating their old queries or adding a special directive to enable single pipe…)
(I wonder if one day, if the majority of users are using pipe syntax and don't mind updating their old queries or adding a special directive to enable single pipe…)