> The thing is, I am extremely familiar with regexes (I've even written a regex engine), so I know exactly how readable they are - even after knowing them really well.
Your experience writing a "regex engine" once upon a time led you to believe regular expressions are difficult to read.
My experience maintaining a few million lines of perl over a couple of decades has led me to believe that I can read regular expressions with no discomfort.
The Real™ thing is you can get better at anything with practice, even this, but listen I also think K is more useful than regular expressions and I would have used less perl had I learned K sooner.
> So the fact that you think they are still readable suggests to me that your judgement of K's readability is also suspect.
It should make you suspect whether or not you have any idea what an expert actually is. I mean, the inventor of regular expressions tinkered with them for decades, and new advancements are still happening sixty years later!
You don't know what you don't know, and there is very little you can do about that except pay attention to people who can do things you do not know how to do yet, and reserve your judgement about how they do it until you can do it better.
The only thing k has in common with regular expressions is your claim they are both difficult, a claim I disagree with.
> > Why do you wonder this?
> It would be a reasonable explanation of why K exists.
You misunderstand me, perhaps on purpose, but I hope you and others will think about this: Why do you care why it exists when I have shown you something so much more amazing than an opinionated history lesson?
I think k exists to make programs that make money. Forever. Because a little bit of money from a lot of programs over a long time is worth a lot, k is fast to write it. Because sometimes getting the answer faster makes more money, k runs fast too. Because people are trusting their money with it, k runs very predictably. Because sometimes your vendor just changes the input format on a Friday night, it's important that it is easy to read and make changes to k programs.
Arthur said it was the keys to the kingdom.