Hacker News new | ask | show | jobs
by jiggawatts 1037 days ago
Syntax matters.

Sure, you can learn to read and write what superficially looks like line noise, but the market has spoken: very few people want to.

Look at the success of Tensorflow and PyTorch. They’re also tensor / array programming systems. They’re wildly popular, with at least two orders of magnitude more users each than all array languages put together.

The difference is that they’re built on top of Python, which is famously user-friendly in its syntax.

More importantly: they were parallel and GPU-accelerated from the beginning.

What’s the point of an array-based language if it’s slower and harder to write than the equivalent in mainstream languages!?

Their current niche of “quants analysing time-series data” is tiny and shrinking all the time.

There was even a chap here advocating the speed and terseness of his preferred array-based language.

Meanwhile the equivalent in Rust was something like a thousand times faster and not much longer!

Array-based languages have been infected by a particular style largely unique to certain types of mathematicians: brevity over clarity, obscure syntax over English, idioms instead of identifiers, etc…

They’ll never be popular while they remain purposefully niche, appealing only to the type of developer that uses single-character file names: https://news.ycombinator.com/item?id=31363844

3 comments

> What’s the point of an array-based language if it’s slower and harder to write than the equivalent in mainstream languages!?

How many times would you throw away a 1000 line program and start over with completely different data structures and algorithms, just to try a different approach? What about a 10 line program? Or a 1-line program?

When it's basically free to rewrite your entire program, you tend to explore more. That's one benefit terseness affords you.

With auto complete I rarely type more that a character or two of any single thing. I doubt it takes me much longer to compose a traditional program compared to array language syntax with modern tooling.
The (human) memory footprint of the more verbose program is much larger though, requiring it to be thought of in smaller chunks, and thus in a slower manner. You can't keep the mental model of a 1000 line program entirely in your memory, but a 10 line program is different, even if the individual lines are more dense.
> Syntax matters.

Indeed it does! Not to try to be confrontational, but have you written any substantial programs in an array language like APL? I'm sure that any APL programmer will be the first to tell you that writing APL would be unbearable if those "unreadable" symbols were replaced with names! Why? Because in APL, each symbol is a unit of meaning, and there's simply no reason for each unit of meaning to be more than a single character. Why should I type `add folded divided_by count` when I can just write `+/÷≢`?

> Sure, you can learn to read and write what superficially looks like line noise, but the market has spoken: very few people want to.

True! And it will surely always be true! But no one would want to write APL without the symbols. ("But isn't Tensorflow just like APL without the symbols?" No. Tensorflow is based on the array paradigm, but it is very, very different from an array __language__ like APL.)

> obscure syntax over English

This is effectively like berating the Chinese for inventing a writing system that looks nothing like the Latin script. Is it totally different? Yes. Does that make it inherently bad? No. (Can it still be bad? Yes! But I don't think APL and friends are as bad as people might think.)

Anyway, that's my two cents on the obscure syntax of array languages are a tool, not a problem. They'll always limit the userbase, there's no doubt about that, but I couldn't imagine a world without them.

> They’re wildly popular, with at least two orders of magnitude more users each than all array languages put together

Except for Excel. Which is probably three orders of magnitude more popular, if that is how you measure things.