News for hackers. Stuff that matters.
Re:Concatenation is composition by marcosdumay on Monday July 18, 2022 @11:58AM (#32139805)
> One character operator is still an operator.

Yet if you look at the original code and you version, the difference is perfectly clear.

Programmers are not computers, so syntax is important.

Re:Concatenation is composition by thesz on Monday July 18, 2022 @12:52PM (#32140437)
What I did was not even at syntax level. These are lexems that were changed, a level below syntax.

When you use C, you can write "~ x" and you can also write "??- x" [1], a slightly more verbose version of the same thing.

[1] https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C

I did exactly the same - I changed lexical structure of language, mainitaining the syntax, most of it.

Programmers, just like most other people, read words as a whole entities, quite like hierogliphics [2]. If we talk about "people are not computers" we should recognize that and allow for longer (yet atomic) lexical structure of the same language.

[2] https://www.mrc-cbu.cam.ac.uk/people/matt.davis/cmabridge/

Re:Concatenation is composition by dkersten on Monday July 18, 2022 @01:38PM (#32140953)
All they did was do C preprocessor style text replacement to illustrate that, semantically and syntactically, they are very similar, the only difference being that APL chose to use super terse operator symbols instead of names. Assuming that the language allows Unicode identifiers, you could just as easily define even? or whatever to have a symbolic name and the factor/joy/forth code would look almost the same as APL.

Now I’m not saying that APL isn’t interesting and that it’s choices aren’t useful, just that the comparison here shows the difference in many ways is a surface level, visual one.

Of course syntax does matter but we could argue all day about whether replacing everything with symbols as APL does is more or less readable, for non-trivial code, than what factor/joy/forth do (once familiar with either style).