by justsomeuser · 5y ago · 0 comments
> Queries are 80% shorter than imperative code
From the examples they look the same length as the corresponding JS I would write, maybe slightly longer.
What are the advantages to using this language over JS?
JS has a fast JIT which would make filtering data fast. How does this query language compare in performance? Does it have indexes?
Just like how you could easily manipulate tabular data using numpy or pandas (or excel), but SQL allows you to do it declaratively, which has benefits in some cases.
The motivation for JSONiq and RumbleDB is discussed in this recent paper, the core argument is data independence:
https://arxiv.org/abs/1910.11582v3
JSONiq is a functional language and thus makes it easy to scale to collections that have billions of objects.
A notable difference with JavaScript is that JSONiq has the FLWOR expression, which is similar to, but more generic than, a SQL statement.