News for hackers. Stuff that matters.
Re:Stages of denial in encountering K by ehsankia on Monday March 09, 2020 @01:36AM (#22523216)
range(100).reduce(plus, 0) isn't cryptic, what's cryptic is single character symbols. Looking at that line, unless you know K specifically, it's very difficult to figure out it's a reduce. Where as `sum(range(100))` is pretty self explanatory to most programmers who don't know python.
Re:Stages of denial in encountering K by rabidrat on Monday March 09, 2020 @01:40AM (#22523227)
Not to mention it's a lot easier to search for `reduce` than `+`.
Re:Stages of denial in encountering K by kaminari on Monday March 09, 2020 @05:55AM (#22524180)
I don't know K but "+/" immediately stood out to me as "add over", so I think they made a good choice in using "/" for fold.

"!", on the other hand...

Re:Stages of denial in encountering K by qayxc on Monday March 09, 2020 @09:56AM (#22525347)
There's no good (or bad) choices for mapping abstract concepts like ranges, mapping, reducing, or combining to common (ASCII-) symbols. Every choice is inherently arbitrary and carries no meaning whatsoever (besides maybe ergonomics). One could just as well argue that "/" is the ISO 8000-2:2009 2-9.6 recommended symbol for division. The same source also shows why symbols alone are inadequate for an explicit representation of abstract concepts: the Nabla symbol alone represents 5 different operations depending on context according to the ISO standard.
Re:Stages of denial in encountering K by chrispsn on Monday March 09, 2020 @06:16AM (#22524239)
What would be a more obvious symbol choice for range (aka til or seq)? Pound (#)?