Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you want a serious answer, as a k programmer ||\|x (which I assume your example is based on) is instantly readable as producing a bitmask of ones up to the last. ie 0 1 0 0 1 0 -> 1 1 1 1 1 0. Or a max scan from the right on integer arrays. I don't know how to even describe that in English succinctly, let alone most mainstream programming languages. (Haskell - reverse.scanl1(||).reverse - ok, not too bad)


I dont see why one cant have both. Give it names and translate them down to the base symbols so it has a readable syntax.

Id just call it something like exceptLast, lastOf, or endOff or something.


You've sort of answered your own question. None of those three would obviously mean the same thing to me. And that's just one possible combination. If you consider all possible combinations of 4 symbols in K, most of them will have a distinct but obvious (and useful) meaning that is extremely hard to summarise in a single word.


You can give them names if you want, and Q does so.

However doing so looses the ease of recognition and the malleablity the symbols provide.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: