Really intriguing article about a SQL syntax extension that has apparently already been trialed at Google.
As someone who works with SQL for hours every week, this makes me hopeful for potential improvements, although the likelihood of any changes to SQL arriving in my sector before I retire seems slim.
“|>”? Why? That’s such a difficult combination to type and it seems entirely unnecessary.
It’s used that way in Elixir. I don’t find it a problem.
It’s unnecessary, though - the keywords alone are sufficient. I dislike “clutter” syntax.
Possibly unpopular opinion: more languages should embrace unicode symbols in their syntax with multi-character ascii equivalents like Raku did. I set my vim config to automatically replace the ascii version with unicode. It wasn’t hard, it makes the code a little more compact, and with good character choices, it stands out in an understandable way.
I think that makes it harder to work in a language… you certainly can set up an editor autoreplacement but once a decade or so someone’s going to need to hotfix something in a strange environment and trying to force things into nano using alt codes is a real pain.
That said the intentionally hard to type symbols with ascii replacements actually make me less sad than things like this syntax that requires a pipe character… I don’t know if you’re a polyglot (or ever typed on a keyboard in quebec) but most of these languages’ symbol choices are convenient on an en-US keyboard with little consideration for international keyboard layouts and there are a lot of hard to type symbols on the spanish keyboard that are very common in programming languages.
This should be done with font ligatures, not replacing character combinations with other characters that can’t be typed normally
F# also does that
in Clojure it’s
->
for inserting the piped argument at the head position in the args of whatever it’s passed to and->>
at the tail. It’s great for working with immutable data in series of approachable transformations and also what I believe to be a reason behind so many DSLs for generative programming were written in that language (besides REPL). Oh and don’t worry about excessive copying as that is generally well optimized.It can be super useful with what itself is a kind of a DSL for SQL more than an ORM, called HoneySQL, like
CTRL+ALT+<, SHIFT+<
🙃🤡