|
|
|
|
|
by beagle3
4255 days ago
|
|
It has one: q. But once you get over the syntax, you realize that you also need to grok different semantics that you are used to. Some q is readable english - e.g., an expression like sum price where size>3
is (to the uninitiated) more readable than the equivalent k +/price@&size>3
but that only works for simple stuff. The (idiomatic!) computation of maximum-subarray-sum[0] |/0(0|+)\
becomes max over 0 (0 max +) scan
which is not more readable. And you can drive the point ad absurdum by making it even more verbose: max over zero (zero max plus) scan
The syntax seems like it is what stops you from understanding it because it is the first thing you meet. But it's the semantics that you need to grok, and the syntax just matches them.[0] http://en.wikipedia.org/wiki/Maximum_subarray_problem |
|
over(max, scan(0, max(+, 0))
slightly more readable, even if that still gives me a higher-order-headache.
Because, y'know, it's confusing to have symbol salad with a weird mixture of infix and postfix operators, even more so if you have type raising (or the moral equivalent thereof) thrown in for good measure.