K Language (2011)
A story, since in retrospect I think it&#x27;s worth telling.<p>Some years ago I was at the SF Clojure meetup.  Arthur Whitney&#x27;s daughter worked at the sponsoring company, and he agreed to come tell us about K.<p>In retrospect, I don&#x27;t think we gave him the welcome he deserved.  No one was rude or anything, but it seemed there was a disconnect:  Arthur was keen to show off how <i>fast</i> K (and Kdb) was, over zillions and zillions of rows.<p>But the thing that the Clojurists were all searching for (that got them into Clojure in the first place) was <i>expressivity</i>.  Is Clojure fast?  I don&#x27;t know, generally the problems I face come down to avoiding balls of mud rather than performance bottlenecks.  And I think that was true of most there.<p>So Arthur got something of an underwhelming reception.  I remember someone asking &quot;Does K have the ability to self-modify, a la Lisp macros?&quot;  When Arthur said no, you could see most people in the room just sort of mentally shrug and move on.<p>And this was too bad.  Because recently I&#x27;ve been playing around with J (another APL descendant) and been very impressed by some expressivity&#x2F;readability benefits.  Some small things that have very big effects on the codebase you actually end up with.<p>The first thing is the avoidance of abstraction.  To use a Twitterism:<p>Broke:  Just write your code and don&#x27;t divide it into functions, creating one long main method<p>Woke: Divide your code up, naming parts that get reused<p>Bespoke:  If your code is made up of <i>really really short</i> things, it ends up being shorter than <i>the names you would use</i>, so you can just <i>write the thing</i> rather than your name for it. An analogy would be:  there is no human-comprehensible way to communicate the idea of &quot;picosecond&quot;  in less time than an actual picosecond.<p>The other thing I didn&#x27;t expect was the benefit of multiple dispatch being baked into e v e r y t h i n g.  In Clojure I might write (map + a b) to add each index together; in J I could just write a+b.<p>This is neat stuff!  Best practices for keeping complexity down in APL&#x27;s tend to be the <i>opposite</i> of what they are in other languages.  Aaron Hsu gave a talk about this: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=v7Mt0GYHU9A" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=v7Mt0GYHU9A</a><p>It&#x27;s too bad!  Arthur came to tell us about speed---there&#x27;s a reason it&#x27;s used on giant datasets in <i>finance</i>, where performance translates directly into cash---but I wish we&#x27;d had the presence of mind to ask more about <i>experience</i> of writing K.<p>So, Arthur, if you&#x27;re reading this:  Sorry everyone seemed kinda bored in SF a few years ago when you kindly came to present.  We missed out!