Comment by Jenk
4 years ago
Maybe it's because I'm tired. Maybe it's because I'm half reading this article while my 2yo is bathing/playing in the bath
But that looks like a really error prone syntax.. error prone like writing Brainfuck I mean.
4 years ago
Maybe it's because I'm tired. Maybe it's because I'm half reading this article while my 2yo is bathing/playing in the bath
But that looks like a really error prone syntax.. error prone like writing Brainfuck I mean.
Yea and no.
Consider mathematical notation. That digit 2 could mean “power of 2” if it’s small and upper right of an object; “index 2” if small and bottom right. “Multiply by 2” if regular sized and to the left - very confusing! Indeed, it is very confusing if you are not versed in the accepted syntax of math expressions.
But if you are used to it, there’s no confusion - it’s just a very concise and useful way to express various concepts.
K is similar.
The argument is that your entire program fits on one screen. It may be hard to read (without practice) but you can stare at the whole thing all at once. I don't know if I buy the argument but it's an interesting one.
It’s just a first impression. This is a very effective tool. Ofc it requires some effort to use (as well as mathematical notation). Required reading https://www.eecg.utoronto.ca/~jzhu/csc326/readings/iverson.p...
You’re not wrong. While writing K you sit in the repl and work out each piece as you go and make sure it gives the result you expect and then build up.
Hmm yeah if you have to go to those lengths to write it then I seriously doubt anyone else could read it. Not easily anyway.
Seems a lot like regexes - terse and powerful but essentially write-only.
Many people can read it easily. Developing things in a repl is common in many languages, it doesn't mean the code is unreadable.
And the result of this trial-and-error programming process is, supposedly, a program that is protected from bugs because... it is short and you can see it on your screen all at once.
Not sure I buy it.