The Array Cast https://www.arraycast.com/episodes/
RSS address: https://www.arraycast.com/episodes?format=rss
The Array Cast https://www.arraycast.com/episodes/
RSS address: https://www.arraycast.com/episodes?format=rss
They downplayed the terseness and non-ASCII symbols of the array languages as something you get used to and something that's worth it to get the benefits of array languages, but the benefits they listed were mostly ones that I'm already very familiar with from working with higher-order functions in most mainstream languages today.
It felt like the hosts had missed that map/filter/reduce have gone mainstream and are now available ~everywhere without having to learn a whole logographic writing system first.
It also makes differences stand out so logic bugs are more visually obvious.
However the most popular professional style of Haskell code is far too verbose for me to be able to "see the essence" in many cases without a round of refactoring.
Its far worse and far more grating for Java code that makes you do so much for so little.
Understanding that your logic bug is obviously somewhere within a handful of lines of K/Q/etc that fit neatly on a single screen vs scrolling through 200 lines of logic in Python/Java/whatever is focussing.
Sure each line is more compact and may take more time to digest, but that is a reasonable trade-off in most cases.
For me, 10 lines you need to read carefully beats 100 lines of having your eyes glaze over and repeatedly skip over the bug because you are so dulled to all the boilerplate.
However I still find them useful (and fun!) because of the terseness, not in spite of it. Terseness means array languages are very mathematical in nature + can be really ergonomic to write, especially with the repl. If someone said "learn an array language, they're easy to write on paper" everyone would think they were insane... but there is something to it, in certain cases. The idea of "fearless refactoring" is popular in the FP world, but it can also be true in the array language world too.
Indeed, and sometimes not needing a computer to quickly splash out an idea you're thinking/talking about is extremely useful!
Over Christmas, I showed my brother {+⌿⍤2(∘.≤)⍤1⍨⍵} as a small expression to explore attribute to pick playing Top-Trumps admist a discussion. Not something you'd be able to do in many other languages!
{+⌿⍤2(∘.≤)⍤1⍨⍵}
{ ⍵} ⍝ single argument (monadic) function with argument ⍵
{ ⍨⍵} ⍝ "selfie" - ⍵ f ⍵ where f is (∘.≤)⍤1
{ ⍤1⍨⍵} ⍝ on each row (1 dimensional element)
{ (∘. )⍤1⍨⍵} ⍝ cartesian (outer) product of each row with itself
{ (∘.≤)⍤1⍨⍵} ⍝ ≤ comparison of those elements - produces 6 30×30 boolean matrices
{ ⍤2(∘.≤)⍤1⍨⍵} ⍝ on each of those matricies (2 dimensional element)
{+⌿⍤2(∘.≤)⍤1⍨⍵} ⍝ sum the columns
leading to:
{+⌿⍤2(∘.≤)⍤1⍨⍵} ⍝ compare each row (⍤1) to itself (⍨) and count (+⌿) how many cards that beatsThat make sense?
So, usage would be something like:
CardPower ← {+⌿⍤2(∘.≤)⍤1⍨⍵}
CardPower cardMatrix
Thanks for that follow up comment.
Other languages support regex for example, but perl takes it to a different level that changes the language experience.
Still, there is a fun about a desk calculator on so many steroids that it's a Turing-complete programming language. One of the ArrayCast podcast guests said array languages were "like a Domain Specific Language (DSL) with an enormously wide domain". How many mainstream languages will let you fork and hook and have inverses and over and under and recursively descend into anonymous functions, without ceremony or boilerplate code? You could have that now to play with, without waiting for it to go mainstream, just by learning a two or three dozen unfamiliar glyphs - compare that to the effort of learning a whole new framework for making web applications and it's much smaller.