a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by rthomas6

It occurs to me that K meets most of these language design goals better than anything, and not many people have heard of it, because it's hard to read. Here is a program to list all the prime numbers between 1 and R:

    2_&{&/x!/:2_!x}'!R

Oh by the way, it's faster (!!) than C.

People don't use it except in niche applications because people can't look at it and see what it's doing. To me, it might as well be brainfuck with the amount of line noise it has. Readability and rapid comprehension are even more important, IMO, than brevity and power/expressiveness. That is why Python is so popular. It got all its libraries and ecosystem because it was easy to write AND easy to read, in addition to having a kind of syntactic brevity, so lots of people could rapidly iterate on it. It's not as powerful as Lisp or Haskell or whatever, but maybe it doesn't have to be for most applications.

I think Nim is a language to watch for these reasons.





Devac  ·  1234 days ago  ·  link  ·  

This is probably the first time I've seen K mentioned outside Project Euler or similar place. Kudos!

As far as Python's popularity through readability is concerned, I'd add one extra facet related to readability: it makes writing tutorials, and learning/teaching in general, much easier. It also makes post-intermediate resources more available and treated by multiple people, even as blog or SO posts. Few languages can match it in that regard.

Power is important, but for every hacker determined to program something using only folds and flips or what have you, there's a thousand people who are unlikely to need stuff beyond Think Like Computer Scientist and a decent level of reading comprehension (for mentioned blogs or SO posts if anything). I'm saying it as a fan of both Haskell and Python.