I'm a native English speaker. I do actually remember programming languages feeling a little uncanny at first. Like you can tell that it's "computery" and that the language author tried to make it English-like and only sorta succeeded.
So I think at this point, for me, programming languages just aren't English. One odd thing I've noticed is that in Ruby the `unless` keyword confuses the hell out of me, and yet when speaking English I never get tripped up on the actual word "unless". So I guess it's handy that the keywords in programming happen to be English words, but my comprehension of programming languages seems to occupy another region of my brain.
I’m not a native speaker, but I always liked the postfix “unless” in Perl, for use with operations that are performed in the common case and only omitted under special circumstances.
It vibes with “unless” in English usually implying an exception.PERL was too clever by half, but if you leaned into making it readable, there were lots of tricks that could help.
... it wouldn't be the way you'd do it today, but if used "tastefully", they were helpful!I'm quite fluent in english and "unless" is also weird to me, for some reason, "when" in ansible is also very weird, I don't know why. Back to the original post, I would never work for my (French) government again if they adopt something like rouille ; just reading the README felt very weird.
> "unless" is also weird to me
I think that’s because it (¿almost?) always splits “is not” in two parts. Compare “If x is not y” with “if not (x is y)”.
> for some reason, "when" in ansible is also very weird
When feels weird to me, too. I think that is because “when” often implies something will happen, but you don’t know the exact time, while “if” means you don’t know whether it will happen at all (compare “when it rains” with “if it rains”). So, using when to describe a trigger is fine, but to me it doesn’t make sense as a statement in an imperative programming language.
> just reading the README felt very weird.
I had to check, and yes, there is a README.md, and no LIVREMOI.md.
Wouldn't that be LISMOI.md ? [edit] nope - apparently LISEZMOI.md
Possibly. My French isn’t that good.
Going to go with "yes" based on this 2nd hit in a DDG search :) https://gitlab.com/bztsrc/easyboot/-/blob/main/LISMOI.md?ref...
[edit] n/m based on correction below and followup search, there are far more LISEZMOI.md files than LISMOI.md files.
It would be LISEZMOI.md
Unless When
I guess you will not like Lisp then (;
http://clhs.lisp.se/Body/m_when_.htm
But rust lets you use unicode for identifiers. Just make every variable its own greek letter. Or Tamil, plenty of languages available. Why waste screen space by using entire words? That is mostly sarcasm, maybe?
Didn't someone say something about using French to speak of love and german to speak of science? Maybe english is getting it's use.
> Didn't someone say something about using French to speak of love and german to speak of science? Maybe english is getting it's use.
That's interesting - as someone noted below, in musical notation, the keywords are nearly all Italian, and it would feel quite weird if they were written in English instead. So in that sense, yeah, maybe `for`, `if`, `then`, `import`, etc. are the "fortissimo" and "d.s. al coda"s of the programming world.
> But rust lets you use unicode for identifiers. Just make every variable its own greek letter.
This can actually be useful for locally-defined variables. Even more so if you're using an editor with LSP support where it's trivial to bring up the doc comments for an identifier as a tooltip - with some added support, you could even write these doc comments in multiple natural languages, while keeping the code itself quite linguistically neutral.
> Didn't someone say something about using French to speak of love and german to speak of science?
Possibly a quote attributed to Charles V: I speak in Latin to God, Italian to Women, French to Men, and German to my Horse.