3 ms·
SQL is not more expressive than Turing Complete languages, no.
by mgummelt 8y ago
SQL is not more expressive than Turing Complete languages, no.
- garyclarke27 8y agoThey’re all Turing complete inc SQL with case and recursion. I meant density, 1 line of a code, a SQL window function with a filter clause would probably take a page of Java to achieve the same result.
- YawningAngel 8y agoNope, Java has map and filter just fine. Eg ``` Words.stream() .map(word -> String.toUpperCase(word)) .filter(word -> word.startsWith('A')) ```
- JohnCohorn 8y agoSQL window functions aren't rocket science(not that I've used them much, cause ORMs and popular stripped down DBs like MySQL tend to not support them very well), but they do a lot more than you think if you're comparing them to trivial map/filter operations.
- dragonwriter 8y agoMap and filter together in Java reflects why you get from SELECT and FROM without aggregate, much less analytical (window) functions. Aggregate and analytical functions correspond to reduction operations, which Java supports but doesn't come with canned equivalents to common analytical methods, just aggregates, AFAIK.