3 ms·
On that note, why do array languages use terse notation and avoid newlines? Regexes do this too, but at least Perl 6 / Raku is pushing for a multi-line form. T
by amluto 3y ago
On that note, why do array languages use terse notation and avoid newlines? Regexes do this too, but at least Perl 6 / Raku is pushing for a multi-line form. There are even initiatives to give lisps friendlier syntax.
- lokedhs 3y agoI'd argue it's partly because of tradition. If you look at early APL code, including Iverson's earliest papers, it's written with pretty much zero spaces (well, except for where spaces are required). A lot of APL programmers continue this tradition, and it works for them. Not everybody does it though. I'm one of those people that adds spaces and newlines to try to make the code more clear for myself. As an example of the kind of code I tend to write, here's the code for the Kap output formatter: https://codeberg.org/loke/array/src/branch/master/array/standard-lib/output3.kap https://codeberg.org/loke/array/src/branch/master/array/stan... Of course, if you don't know what the symbols mean, a lot of it is probably still impenetrable, but I think this code is less dense than your typical APL code.