5 ms·
You have a massive selection bias going on here - you're not going to use APL if you do not already tolerate this kind of code.
by DagAgren 7y ago
You have a massive selection bias going on here - you're not going to use APL if you do not already tolerate this kind of code.
- beagle3 7y agoI didn’t tolerate it before I started using APL and K. And now my C, while not entirely ArthurWhitnious, is closer to this kind of code. When I first saw examples of how terse K and APL code gets, my thought was “obviously, the language was designed to solve this specific example or it wouldn’t be this terse”. But after the 100th or so significantly different example, one can’t NOT admit that the problems are simple, and common practices are just incredibly bloated..... which leads some (me for example) to adopt a much terser style.
- smabie 7y agoLearning q has changed almost everything I believe about what good programming practice should be. Functional Haskell or Scala code that I used to consider to be highly elegant, I now think unnecessarily verbose. And don’t even get me started on Java or Python...
- tluyben2 7y agoAnd I find q verbose :) However my poor statically typed brain is keeps struggling on how to mix Haskell (...) with APL/k. Video on that topic is here[0]. [0] https://www.youtube.com/watch?v=z8MVKianh54 https://www.youtube.com/watch?v=z8MVKianh54
- RodgerTheGreat 7y agoIndeed. It is rather common to see K criticized as a "domain-specific language", but empirically it seems that K's domain is rather large. One of the reasons I wrote iKe was to demonstrate that the same primitives which are well-suited to constructing databases and financial models can be applied to computer graphics. With little more than bindings that supply appropriate IO capabilities, you can even write games in K: https://github.com/JohnEarnest/ok/blob/gh-pages/ike/examples/asteroids.k https://github.com/JohnEarnest/ok/blob/gh-pages/ike/examples... https://github.com/JohnEarnest/ok/blob/gh-pages/ike/examples/snake.k https://github.com/JohnEarnest/ok/blob/gh-pages/ike/examples...