there is demand for readable replacement of regex
write-only languages stop giving "better thought" right after you stop writing that part of the code
This is just a restricted form of functional and high order programming. It's slightly unusual but many people feel comfortable with it.
perhaps not to you but perhaps they are for a large number of people who are used to seeing words they recognize, surely being able to read a simple program before you have learned and guess what it means will be a great comfort to people and make them feel that yes, they can learn this.
A bunch of incomprehensible glyphs might interest someone like a puzzle solving challenge, but not everyone will want to solve a puzzle in order to first start to learn a language.
This argument was already used in the past to justify the very verbose syntax of COBOL.
My argument was that a language that looked comprehensible might invite learning, which is not exactly the same thing.
Looks like we found Goldilocks zone of programming languages in years after first version of COBOL.
BASIC is too little, COBOL is too much.
Array languages is less than BASIC.
And it is Perl which is humiliated for line noise all these years!
Considering the current state the Goldilocks zone of programming languages is like calling the verbose style in which mathematical proofs were written down in the early modern period the Goldilocks zone of writing down mathematical proofs. :-(
And it is good in both ways: some times ago there was idea that everybody should learn a little of programming (see, for example, BBC program in UK which brings us BBC Micro and, later ARM processor ;-) ), because now almost everything is computer (including my wahsing mashine). Now, it is not popular idea, now all corporations try to build non-programmable walled gardens, but it was not so always.
COBOL (and SQL) were created with managers, not programmers, in mind. Goal was to allow managers automate their business-processes without calling for IT consultant.
Spreadsheets are VERY near to this goal. I've seen A LOT of business and finance automation made in excel by people, who will punch you in the face, if you say them that now they are programmers.
If we want to have very specialized, PhD-requiring languages, it is perfectly Ok. But then don't try to sell them to Spreadsheet users.
The problem rather is that "fetching people where they are" regarding the programming language design means keeping these people stupid. Instead, you should market the programming language to spreadsheet users by explaining them how the new kind of thinking that the programming language enables lets their intellectual potential explode.
My experience shows, that programmers love their job and want to be better for sake of being better much more often, than other employees (and it is considering norm - like "show your github profile" on hiring, do you know cases when auto mechanic is required to show custom-build car to get job in the shop?). And even among programmers it is not universal rule, I know some colleagues (very competent ones, need to say) for whom it is simple job, not passion. They don't read bleeding-edge papers on CS, they don't have pet projects and, even, may not own computer at home - PlayStation/XBox and smartphone is enough for them, because computers are tool of trade, not home necessity.
Also, all these comparisons with mathematical notation left out that mathematical notation is not linear and one-font-size-fit-all, as our programs, even in array languages.
In the modern technical world, you are basically surrounded by mathematics; thus a lot of people (in particular nearly all programmers) have already seen many such symbols.
Of course they are! I can't type them in on my keyboard without doing a google search first.
It's a barrier according to all definitions of the word. It's unnecessary friction. It's slower to type in when learning. It's slower to read when learning.
Compare it to a language that isn't bragging about how smart you are if you know it - all those barriers are removed.
----
Yes because APL or array languages in general have absolutely no hidden gotchas ...
You mean like how you've got to find out how to type accented characters - á or ö for example?
The glyphs are available as a keyboard layer which you can easily find and install, or simply enable on Linux.
Yes there is an initial hurdle when you're learning, but the same applies with +-×÷, and any languague with a different alphabet/symbol set! Once learnt however, the ~50 odd symbols are all the primitive functions, and then have speed and ability like maths to write and play with expressions.
Thee difference is, with any other new programming language I already know those! IOW, it's not a barrier.
> Once learnt however, the ~50 odd symbols are all the primitive functions, and then have speed and ability like maths to write and play with expressions.
50? You'll forget them if you don't use them. Still a barrier, even when not learning anymore.
Look, I get that there's a speed upgrade, but it's a balance, and 50 is way too much for something that you'll forget easily due to lack of usage.
For example, why bother with 26 elements that compose to all the words in the English language? One can simply memorise the most frequent 30000 words and assign a different rune to each one.
Obviously, we don't do that. The languages that do do that get outcompeted by the ones that don't.
The simple reality is that languages, both human and programming, have to match what the average human is most productive in. It doesn't matter that genius developers are more productive with esoteric runes; their experience is irrelevant because they aren't doing the grunt work that 99.9999% of programming entails.
I don’t want any characters in my computer program I don’t see on my keyboard.
Why not make it straightforward first and then when people understand it, introduce the shortcuts? Not nerdy enough?
Sometimes I have the feeling that a certain type of peogrammer doesn't even want others to understand what's going on, what they want is bending them to their own will and conventions.
IMHO, it is relevant to discussion about array languages.
Chinese, theoretically, is more simple language than Vietnamese in terms of grammar structures and such. But Vietnamese uses Latin alphabet (augmented with diacritics) and for western person it is huge help when you start to learn language. Maybe, on B2+ level it is not relevant anymore, but when you try to study language from zero it is blessing (again, for western person).
So the only audience where this is not true, is non-English speakers who want to learn an array language as their first programming language.
It's not necessary to make everything toddler-safe; we already have Python.
Or, you could use C++ which, on one hand is hard and obtuse to read, and on the other hand, has 10x as many footguns as C.
Here is a short read on this topic,
https://www.amazon.ca/Embracing-Modern-Safely-John-Lakos/dp/...
It's only 2661 pages. Yes, that is almost 3x longer than The Rust Programming Language, 2nd Ed.
Had a guy that tried to push LaTeX as documentation writing tooling for the whole company.
Sales guys went with Confluence. They were more concerned with actually closing million dollar contracts than learning fancy typesetting system.
As it happens, I find terse languages, and "code golf", as more approachable and thus readbale. It is lower volume, more concise and compact. Generally, I can read all of it. I use an ASCII-based array language: https://en.wikipedia.org/wiki/K_(programming_language)
I am not sure why I prefer less code to more code. In any case, I am thankful these languages exist.
To insinuate that no one takes array languages seriously would of course be wrong, as one can see from the above Wikipedia page.
The question I have is why anyone who prefers popular verbose languages would care about the discussion of unpopular array languages on HN. Why even bother to comment and complain. If array languages are incomprehensible and unpopular, then why pay any attention to them.
Array languages are very easy to avoid. Imagine trying to avoid Python. Not easy.
Telling array language authors to make their languages more verbose is like telling Bob Dylan to play what people want to hear and only then will he have a "tiny chance of being heard and taken seriously". Sounds quite silly.
Thank you, 1vuio0pswjnm7
in some sense it is a "thesaurus vs ancient egyptian" argument
I can totally understand that it would be infinitely nicer to build Stargate and go fight Goa'uld or inherit knowldge of the galaxy-spanning Asgard - but it's the events of "Yes, Minister" that actually do happen in our, real, world
> As it happens, I find terse languages, and "code golf", as more approachable and thus readbale. It is lower volume, more concise and compact. Generally, I can read all of it. I use an ASCII-based array language that uses brackets: https://en.wikipedia.org/wiki/K_(programming_language)
"A case of MUMPS" (https://thedailywtf.com/articles/A_Case_of_the_MUMPS) is on The Daily WTF. "WTF" is exactly the default behaviour of people encountering these codegolf-ed langs
> The question I have is why anyone who prefers popular verbose languages would care about the discussion of unpopular array languages on HN. Why even bother to comment and complain.
you're the seller, I'm the buyer
array enthusiasts advertise their product, listing advantages - we reply with "my problems with it are this, this and this. How can you fix it?". Yes I'm interested. No, I don't agree that my concerns are empty.
> (Also wondering if commenter meant braces not brackets.)
technically, I meant parenthesis. But nowadays, and especially in programming world, all 3 are synonyms and you just add [curly/round/square] in front
brackets are just easiest of the 3 for me to recall
https://pitchfork.com/thepitch/855-dylan-goes-electric-newpo...
"In 1965 Dylan was only 24 years old, but he had already gone through a lot of changes and been criticized and attacked for each of them. His first performances as a teenage rock'n'roller were met with laughter and jeers. When he turned to folk music, the high school girlfriend who had shared his early passions was troubled, asking why he'd given up "the hard blues stuff." When he turned from singing traditional folk songs to writing his own material, old supporters accused him of becoming "melodramatic and maudlin"-one, stumbling across a typescript of "The Times They Are a-Changin", demanded, "What is this shit?" When he turned from sharp topical lyrics to introspective poetic explorations, followers who had hailed him as the voice of a generation lamented that he was abandoning his true path and "wasting our precious time." When he added an electric band, he was booed around the world by anguished devotees, one famously shouting "Judas!""
https://www.mojo4music.com/articles/stories/robbie-robertson...
"We got booed all over North America, Australia, Europe, and people were saying this isn't working and we kept on and Bob didn't budge. We got to a place where we would listen to these tapes and say, "You know what? They're wrong. And we're right." Eight years later, we do a tour, the [1974] Dylan/Band tour, we play the same way, same intensity and everybody says, "Wow, that was amazing." The world came around - we didn't change a note.
The obvious thing we learned - that everybody learned - was there was a new way of songwriting. There was a much more colourful, descriptive, humorous, outrageous thrill ride of wordplay. We hadn't seen this before - this was breaking some big rules. I remember saying to Bob one time, "Maybe there's too many verses in this" (laughs), and he said, "There probably are, but that's what I was thinking about when I wrote it." His spirit was on fire, and he was knocking down the boundaries that had been built up around music. It excited me to be part of this revolution."
https://www.nytimes.com/1998/10/11/arts/music-when-dylan-s-g...
"BUT Dylan was too smart and too stubborn to let hidebound listeners prevent him from making the best music of his career.
The hecklers were wrong about the music, as most of them would probably admit now."
https://ultimateclassicrock.com/bob-dylan-goes-electric-newp...
"The New York Times' Robert Shelton, whose 1961 review of a Dylan concert is considered to have launched Dylan's career, wrote, "The young audience's displeasure was manifested at the end of most of the numbers, by booing and shouts of `we want the old Dylan.' The young star plowed valiantly on, with the sort of coolness he has rarely displayed on stage."
Calling the crowd "rude," "immature" and "noisy young boors," [Dylan] couldn't help note the positive reaction given to "Like a Rolling Stone," which by now was a hit. "Evidently the hostility extends only toward things with which they aren't familiar," he sneered.
[Hostility toward things with which they arent't familiar. Like HN commenters' hostility toward array languages.]
This song-and-dance with his audience continued over the course of the next year."
http://www.goldminemag.com:80/article/bob-dylan-gets-religio...
"The show opened with as excitedly noisy a crowd as Dylan had ever faced, 2,300 souls jammed in, and all with their own loudly exclaimed wish list of favorite Dylan songs and expectations. Fourteen years earlier, you could imagine the 1965 Newport Folk Festival buzzing with similar anticipation and excitement ... and reacting with similar bemusement as the show took shape. Only it was not the sacrilegious explosion of electricity that left the audience reeling in its seats.
As he led the band through a 19-song set, Dylan did not play a single song that predated his religious conversion. Even the encore was uncharted territory. "Blessed Is The Name Of The Lord" and "Pressing On" were both new songs, and though the former rocked and the latter soothed, the crowd was in no mood to be impressed.
Afterwards, Dylan congratulated himself on not playing a single song he'd ever performed onstage in the past, and when the subject of his fans' expectations was broached, he simply shrugged. "Oh, yeah, that's right. They want the old stuff."
Pittsburgh's KDKA TV station even filmed the fans' exodus, with one disgruntled ticket-holder snapping to the cameraman, "He stinks. He's the worst. He's bad. It's a waste."
Dylan's audience was furious. Shocked. Cheated. It was Newport all over again, or maybe the Manchester Free Trade Hall, later on in that so-controversial 1965 tour, when the bootlegger's tape was suddenly interrupted by a bellow of "Judas!""
The fact that nobody selling me on these arcane runes talks about something like that tells me it’s more about code golf for them.
Somehow the usual culprits of +-/*|^&% get a free pass on this, and are somehow less arcane than symbols like ⍋ or ⊃.
There's nothing inherent about this, it's about familiarity, and once familiar, everyone always prefers the symbols over spelling it out like plus, minus, divide, multiply...
And if you had a toggle-able mode, you could still have your code golf.
Whereas APL fans will insist it’s not hard while listing no benefits besides dense code.
* except for the fact you're supposed to remember the idioms for everything : https://aplwiki.com/wiki/FinnAPL_idiom_library
I've always assumed that people working on these languages come from a heavy maths background, so to them the sequence of symbols is more “naturally” readable. So saying “if array language people used words I'd understand better” is not unlike saying “if the Chinese would only speak English there would be less language barriers”. Not wrong, of course, but perhaps not a reasonable expectation.
In similar fashion, when engines were first invented and were being sold to miners, they didn't expect miners to understand the scientific terms around energy, they invented a term that could be easily understood: horsepower. Every miner could wrap their head around the work that twenty horses could do.
Here, x̄ or μ may mean average, but how do you pronounce either? Most are unfamiliar. Identifiers "avg()" or "average()" are more approachable, and already in use in spreadsheets for similar reasons.
I am not an English native speaker, but learned programming before even starting with learning English. In my head, the English keywords used in programming languages are thus just abstract (mathematical) symbols that are incidentally also English words.
As part of my work, I also work with Russian programmers, who, as long as they lived in Russia, hardly ever had to understand anything in English as part of their programming job ("Russia is so big that it is not necessary to learn English"). Just to be clear: they nevertheless attempted to learn English while living in Russia, but because of of intellectual interest, and not because it was necessary or helpful for their programming jobs. I heard rumors that a similar stance holds for China.
Thus: English may be the lingua franca of programming in North America and some European countries, but clearly not worldwide.
So, you don't have "for" or "while" loops where you live? Not even a "main" function?
> the English keywords used in programming languages are thus just abstract (mathematical) symbols that are incidentally also English words
Explanation: People learn python without understanding meaning of keywords used. One must understand what ‘for’ means in python (i.e. repeated execution), but there is absolutly no necessity to understand what it means in English ( https://www.merriam-webster.com/dictionary/for )
Summation (Capital Sigma), Multiplication (Capital Pi), integration, roots. Limit? "lim". Logarithm? "log", etc.
It is not like 50 glyphs of array languages. It is maybe 5 glyphs and 10 other conventions (like division over-under, root and power). Also, mathematics notation is 2D and multi-size (capital sigma is much larger than variable names and numbers, summation indices on under and over sigmas is much smaller) which helps immensely. Same formula written in one font in one line will be much less comprehensible.
UPDATE: Yes, I forogot about E-inverted (exists) and A-inverted (for all), and two or three common operators related to sets (includes, subset), but they are not needed for calculations even in math, only for theorems. And array languages are not theorem proofers.
Each area of math could have its own special notations too, but I don't expect that category theory specialist will understand notation of very specialized complex functions paper.
> Sorry, but mathematics notation is not THAT cryptic.
It can certainly be that information dense. Whether that is considered cryptic or not is in the eye of the beholder.
> It is maybe 5 glyphs and 10 other conventions
Heck, we've got more than 5 glyphs just for expressing (in)equality: =, ≡, <, >, ≤, ≥, ≠, ≢, ≈ (and those are just from memory of doing maths to A-level nearly three decades ago, a couple of years of CompSci after that, & programming since, and that isn't touching on symbol sets from subsets of mathematics like set theory).
> Each area of math could have its own special notations too, but I don't expect that category theory specialist will understand notation of very specialized complex functions paper.
While each area will have specialist notation that is not commonly understood by those unfamiliar with the area, most maths people will understand a chunk of the notation from a number of areas. I don't consider myself a maths person and I know the basic glyphs from a couple of areas when I see them.
> At this point, comments suggesting the code is “unreadable” are bound to be thrown around, but once you learn a handful of symbols, this is in fact significantly more readable than the kinds of formulas I see on a regular basis in Excel.
To your point: what would this look like using English words as identifiers rather than unicode soup whose names I have likely never heard of? It isn't like those characters are easy to find on my keyboard.
Don't let your dreams be dreams (I actually have one): https://www.pckeyboard.com/page/product/00UA41P4A
when will array enthusiasts understand that having first letter A does not mean the language should be aimed at Aliens?
get over your "code golf" tendencies and start thinking about *readability* - give us long names, give us brackets, give us ASCII and stop pulling everything into a single line in examples - _THEN_ you'll have your first tiny chance of being heard and taken seriously
aim design at common people, not gurus