Hacker News new | ask | show | jobs
by nivertech 1318 days ago
> iteration operators

Also converge/scan/over.

https://code.kx.com/q/ref/accumulators/

No mention of adverbs? One of the coolest features of the language IMO:

https://code.kx.com/q/ref/iterators/

> Republic of operators With a rich set of primitives you don’t want to memorise another operator precedence hierarchy. So q doesn’t have one.

This creates an impedance mismatch with the conventional math notation, and may lead to some stupid errors, but I can live with it.

> Prefix notation clarifies the common case where the result of one function is the argument of the next. Instead of writing sum[cos[2+first[list]]] write sum cos 2+first list.

It's a mix of prefix and infix (not counting qSQL which is eDSL).

Composing expressions backwards in the REPL is a little bit annoying at first.

Personally, I prefer postfix and think that it's the most natural for left-to-right input methods.