Are reduce and lambdas really that cryptic/complex to people? I think I need an adult. -.-
Stages of denial in encountering K
31–40 of 432 posts
Re: Stages of denial in encountering K
#32Earlier quoted context omitted.
k is perfectly readable. That's like, one of the biggest points of the post. The post mocks the mindset featured within your comment. None of the languages you listed are quite as readable as k to someone who knows it. All of the languages you listed are significantly slower and feature none of the benefits of a concise notation, even with fast.ai's Python style guide made to imitate Arthur Whitney. http://www.eecg.t…
> k is perfectly readable [...] to someone who knows it A great example of a tautology. Every language in existence passes this test... The real test is a language that is readable by those who don’t know it.
Re: Stages of denial in encountering K
#33Are reduce and lambdas really that cryptic/complex to people? I think I need an adult. -.-
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
#34> +/!10 I personally find the given example harder to read than the equivalent in python/matlab/javascript with lodash/probably many other languages sum(range(10)) sum(1:10) With "K", you have to know a few new conventions. In the second case you just have to read, and the data flow is more obvious.
Even the word “product” would introduce certain ambiguity in context of real world codebase: is it “math” product or some “domain” product?
It’s even worse with most other words.
So if in any given codebase you still have to know the specific meaning of every word, how is it different from having to know specific meaning of every K symbol?
Re: Stages of denial in encountering K
#35If you are stuck in a boring language and want something more concise, you don’t have to give up legibility by going to K. There are plenty of languages where you are not expected to use “for” loops. Python/numpy is most accessible and probably closest to “instant gratification”. Mathematica is great for, you know, mathematics, but you’ll need a license. And there is always haskell.
What does "legibility" really mean? Presumably it means something like the ease of going from looking at code to understanding what it does and how, and having a mental model to reason about the code and what modifying it will do. How many times have you opened a Java/C#/C++ project and opened up class file after class file trying to understand how the whole thing is pieced together, faced with a monstrous system and…
You could find cross references…
Re: Stages of denial in encountering K
#36Re: Stages of denial in encountering K
#37Earlier quoted context omitted.
Really? That’s quite surprising; I would expect all of them to have some sort of “programming languages” course or similar…what classes do they have then?
AFAIK most or all of those curricula do include a sirvey course for programming languages. IIUC the GP was talking about courses that specifically focused on functional programmimg.
Re: Stages of denial in encountering K
#38Earlier quoted context omitted.
> k is perfectly readable [...] to someone who knows it A great example of a tautology. Every language in existence passes this test... The real test is a language that is readable by those who don’t know it.
If you don't know the language, you won't be writing, editing or improving code in it anyway. Your test is therefore irrelevant for programming languages.
Re: Stages of denial in encountering K
#39> +/!10 I personally find the given example harder to read than the equivalent in python/matlab/javascript with lodash/probably many other languages sum(range(10)) sum(1:10) With "K", you have to know a few new conventions. In the second case you just have to read, and the data flow is more obvious.
Re: Stages of denial in encountering K
#40Earlier quoted context omitted.
Many smaller CS departments in the US have no such a course in their curricula. There simply aren't enough professors to maintain that breadth of courses in those departments.
Really? That’s quite surprising; I would expect all of them to have some sort of “programming languages” course or similar…what classes do they have then?
We learned fundamentals, discrete math, symbolic logic, and also "databases" (read: MS Access), object-oriented design, and I forget what else.
With the benefit of hindsight, I feel like I overpaid for that education :)