Are computer languages meaningfully... in english?
Are computer languages meaningfully... in english?
So I've got to wondering... well, the title of this thread: on the one hand, sure, programming languages use english lexicon, right? it's print, not imprima or imprimir. I know a few <not many> programming languages and I've noticed they're all very similar, if not in syntax, in some deeper structures: for example, as English is mostly uninflected, so are I would say all programming languages: and it's not like you couldn't have built inflection into proglangs either: is this cause of technical reasons or simply because the first programmers were english speakers and we all sort of went along? an example of the latter case is almost certainly, to my mind, the case for the way we declare variables: token is equal to expression is, well, a reflection of how you state that a thing is the case in English, right? I'm a sociologist: but it could just as easily have been the other way around: a proglang could express
MyVar=21
as
means 21 MyVar
And would probably be the case if some other natlang had been the L1 of the guys who wrote the first assemblers or whatever.
Is this like... a thing? like, have people thought about this... linguistic parochialism of the way proglangs are, and alternative ways in which they could work? this is not an area I know a lot about.
MyVar=21
as
means 21 MyVar
And would probably be the case if some other natlang had been the L1 of the guys who wrote the first assemblers or whatever.
Is this like... a thing? like, have people thought about this... linguistic parochialism of the way proglangs are, and alternative ways in which they could work? this is not an area I know a lot about.
Re: Are computer languages meaningfully... in english?
I'd say technical. It's much easier to parse arguments between spaces than to try & deconstruct a string of character.Torco wrote: ↑Fri Jan 27, 2023 8:30 pmEnglish is mostly uninflected, so are I would say all programming languages: and it's not like you couldn't have built inflection into proglangs either: is this cause of technical reasons or simply because the first programmers were english speakers and we all sort of went along?
Yeah, this could happen. I do some scripting for my job, and I can tell you I wouldn't want to type "means" instead of "=" every time I needed to assign something. It's 5x the work! (I didn't even feel like writing out "times" there.... crap. I just did...) "=" is an already available symbol that means something very close to what it's doing in programming, so why not use it? Also, when you're scanning code, I'd say that the "=" signs will just out a little bit from the surrounding text, making it easier to ready.
Vardelm's Scratchpad Table of Contents (Dwarven, Devani, Jin, & Yokai)
Re: Are computer languages meaningfully... in english?
i feel like i saw something somewhere, as a joke or proof of concept or something, where someone made a programming language using latin inflection as a part of its structure
-
- Site Admin
- Posts: 2976
- Joined: Sun Jul 08, 2018 5:46 am
- Location: Right here, probably
- Contact:
Re: Are computer languages meaningfully... in english?
Not a COBOL guy, are you? Take a look at this:Torco wrote: ↑Fri Jan 27, 2023 8:30 pm for example, as English is mostly uninflected, so are I would say all programming languages: and it's not like you couldn't have built inflection into proglangs either: is this cause of technical reasons or simply because the first programmers were english speakers and we all sort of went along?
https://www.microfocus.com/documentatio ... DF205.html
In particular, the optional use of CHARACTER or CHARACTERS, and the use of IS or ARE.
But that perhaps leads to the question, why bother? Most languages went for much more terseness, rather than directly mimicking English. I don't think anyone wants the computer to refuse to compile if you use IS where you should have used ARE, and it's hard to think of an example where inflections would help out the coding any.
Sure, though I'd note that that's VOS which is extremely rare in the world's languages.an example of the latter case is almost certainly, to my mind, the case for the way we declare variables: token is equal to expression is, well, a reflection of how you state that a thing is the case in English, right? I'm a sociologist: but it could just as easily have been the other way around: a proglang could express
MyVar=21
as
means 21 MyVar
I'd also note that messing with expression syntax is totally a thing-- some languages go for postfix notation. So people aren't limited to English models.
Obviously it's historical accident that most languages use English keywords. I once asked about this in a French Usenet group... why not (say) use C to define French keywords? But no one thought it was a good idea. Most French programmers probably know at least some English. And one even pointed out that the English keywords kind of stood out on the page (this was before syntax coloring).
Re: Are computer languages meaningfully... in english?
I’ve thought about this on and off, and I don’t think programming languages are influenced all that much by L1s. Having written some parsers, I think the key constraints are that (a) code must be easy to segment into lexemes, and (b) it needs to be easy to determine syntactic structures by processing those lexemes in order. (a) makes code naturally tend to having an isolating character, and (b) means it’s mostly head-initial.Torco wrote: ↑Fri Jan 27, 2023 8:30 pm So I've got to wondering... well, the title of this thread: on the one hand, sure, programming languages use english lexicon, right? it's print, not imprima or imprimir. I know a few <not many> programming languages and I've noticed they're all very similar, if not in syntax, in some deeper structures: for example, as English is mostly uninflected, so are I would say all programming languages: and it's not like you couldn't have built inflection into proglangs either: is this cause of technical reasons or simply because the first programmers were english speakers and we all sort of went along? an example of the latter case is almost certainly, to my mind, the case for the way we declare variables: token is equal to expression is, well, a reflection of how you state that a thing is the case in English, right? I'm a sociologist: but it could just as easily have been the other way around: a proglang could express
MyVar=21
as
means 21 MyVar
And would probably be the case if some other natlang had been the L1 of the guys who wrote the first assemblers or whatever.
Is this like... a thing? like, have people thought about this... linguistic parochialism of the way proglangs are, and alternative ways in which they could work? this is not an area I know a lot about.
Of course, one might wonder if code really needs to have a syntactic structure in the first place…
…which is exactly what Lingua::Romana::Perligata does. I’m not sure it adds all that much expressivity, though.
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Re: Are computer languages meaningfully... in english?
Self-referential signatures are for people too boring to come up with more interesting alternatives.
Re: Are computer languages meaningfully... in english?
Is "can not" an unintentional mistake or a bit of word play?
Last edited by Richard W on Sat Jan 28, 2023 5:19 am, edited 1 time in total.
Re: Are computer languages meaningfully... in english?
Many programming languages largely lack lack pronouns. Perl has them, and routines can have a pronoun with fixed reference to an unchanging privileged, hidden argument, e.g. self.
Re: Are computer languages meaningfully... in english?
A "pronoun" in programming languages, Perl and shell aside, tends to be idiomatic of object-oriented languages, as most OO languages, ones with multiple dispatch aside, tend to privilege a specific argument.
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Re: Are computer languages meaningfully... in english?
I'm kind of reminded of this zompist blog post:
https://zompist.wordpress.com/2015/12/0 ... interface/ ,
and specifically this quote:
One of programmers’ oldest dreams, or snares, is to write an interface that’s so simple to use that the business analyst can write most of the app. I’ve fallen for this one myself, more than once! The sad truth is even if you do this task pretty well, non-programmers aren’t going to be able to use it. To program, you have to think like a programmer, and this doesn’t change just because you make the code look like English sentences.
Re: Are computer languages meaningfully... in english?
More thoughts: Perl sigils are basically noun classes, which must agree within a phrase / expression. (Perl is generally a good place to look for such things; Larry Wall has a linguistics degree.) J has something called ‘agreement’ too (though it’s somewhat different to the linguistic sense), as well as ‘nouns’ and ‘verbs’, and valency-changing operations, including something which could well be called a middle voice (passive/reflexive in one operation). More generally, type systems could be considered to be a form of agreement.
EDIT: This prompted me to search through my Perl book for linguistic stuff. I immediately found two pages on ‘topicalisers’ (i.e. packages and imports), as well as various entries in the glossary on ‘transliterate’, ‘possessive’, ‘indirect object’, ‘IPA’, as well as at least one IPA transcription ([modʑibake] for 「文字化け」.)
EDIT: This prompted me to search through my Perl book for linguistic stuff. I immediately found two pages on ‘topicalisers’ (i.e. packages and imports), as well as various entries in the glossary on ‘transliterate’, ‘possessive’, ‘indirect object’, ‘IPA’, as well as at least one IPA transcription ([modʑibake] for 「文字化け」.)
The flipside of this is that a great many people do find themselves able to think like a programmer, once they’ve gotten past the syntax barrier — or more often, the marketing barrier. Consider the popularity of Excel as a programming environment, for one thing. I also once saw a story of secretaries who ended up creating complex packages in Emacs Lisp, because they thought of it as ‘configuring their editor’ rather than ‘writing a program’.Raphael wrote: ↑Sat Jan 28, 2023 1:15 pmOne of programmers’ oldest dreams, or snares, is to write an interface that’s so simple to use that the business analyst can write most of the app. I’ve fallen for this one myself, more than once! The sad truth is even if you do this task pretty well, non-programmers aren’t going to be able to use it. To program, you have to think like a programmer, and this doesn’t change just because you make the code look like English sentences.
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Re: Are computer languages meaningfully... in english?
Yes. My favourite is قلب, a Lisp-like where you need to be reasonably comfortable with Arabic script to use it. I can't find it now, but I read something at one point about how the use of the word else ended up not really resembling how it's used in English because the person who introduced the construct was a native speaker of German.
Re: Are computer languages meaningfully... in english?
I recall reading this too. I think I saved it somewhere, though probably on my old computer.
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Re: Are computer languages meaningfully... in english?
I mentioned the same point here, linking to this article:
https://github.com/e-n-f/if-then-else/b ... en-else.md
https://github.com/e-n-f/if-then-else/b ... en-else.md
- WeepingElf
- Posts: 1519
- Joined: Sun Jul 15, 2018 12:39 pm
- Location: Braunschweig, Germany
- Contact:
Re: Are computer languages meaningfully... in english?
Computer programming never really felt like talking to a machine to me, rather like building a machine or conducting a chemical experiment.
... brought to you by the Weeping Elf
My conlang pages
My conlang pages
Re: Are computer languages meaningfully... in english?
To me programming is essentially constructing or modifying a system, and programming languages are simply the notation used to do so. Just because they typically use English words to some extent does not makes them have anything more in common with English itself than, say, mathematical or chemical notations. To believe otherwise, to me, is to mislead oneself about the nature of programming itself.
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Re: Are computer languages meaningfully... in english?
I completely agree. I will note that there are many programming languages which use few or no English words in their syntax: for instance, APL (and its derivatives J and K), Prolog, to some extent Haskell and other ML-family languages, and so on.Travis B. wrote: ↑Sun Jan 29, 2023 3:15 pm To me programming is essentially constructing or modifying a system, and programming languages are simply the notation used to do so. Just because they typically use English words to some extent does not makes them have anything more in common with English itself than, say, mathematical or chemical notations. To believe otherwise, to me, is to mislead oneself about the nature of programming itself.
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Re: Are computer languages meaningfully... in english?
One thing to remember is also that just because English words are used in syntax or even in identifiers does not mean that the comments will be in English; in one piece of software I've dealt with written largely by some Germans much of the comments are in German (and make very obvious how limited my German is) even though the identifiers are largely in English.bradrn wrote: ↑Sun Jan 29, 2023 5:26 pmI completely agree. I will note that there are many programming languages which use few or no English words in their syntax: for instance, APL (and its derivatives J and K), Prolog, to some extent Haskell and other ML-family languages, and so on.Travis B. wrote: ↑Sun Jan 29, 2023 3:15 pm To me programming is essentially constructing or modifying a system, and programming languages are simply the notation used to do so. Just because they typically use English words to some extent does not makes them have anything more in common with English itself than, say, mathematical or chemical notations. To believe otherwise, to me, is to mislead oneself about the nature of programming itself.
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Re: Are computer languages meaningfully... in english?
absolutely, I have this same feeling: much more like plotting up a big rube goldberg machine, much less like a conversation. then again, jupyter notebooks feel more like a conversation (or, I'm told, R).WeepingElf wrote: ↑Sun Jan 29, 2023 8:55 am Computer programming never really felt like talking to a machine to me, rather like building a machine or conducting a chemical experiment.
Re: Are computer languages meaningfully... in english?
(1) Much of programming syntax is derived from (western) math syntax, which was mostly developed before english was the dominant european or world language.So I've got to wondering... well, the title of this thread: on the one hand, sure, programming languages use english lexicon, right? it's print, not imprima or imprimir. I know a few <not many> programming languages and I've noticed they're all very similar, if not in syntax, in some deeper structures: for example, as English is mostly uninflected, so are I would say all programming languages: and it's not like you couldn't have built inflection into proglangs either: is this cause of technical reasons or simply because the first programmers were english speakers and we all sort of went along? an example of the latter case is almost certainly, to my mind, the case for the way we declare variables: token is equal to expression is, well, a reflection of how you state that a thing is the case in English, right? I'm a sociologist: but it could just as easily have been the other way around: a proglang could express
MyVar=21
as
means 21 MyVar
And would probably be the case if some other natlang had been the L1 of the guys who wrote the first assemblers or whatever.
Is this like... a thing? like, have people thought about this... linguistic parochialism of the way proglangs are, and alternative ways in which they could work? this is not an area I know a lot about.
(2) Most object-oriented languages nowdays have 2 different syntaxes (one derived from math, the other from english) that do basically the same thing. Compare:
Code: Select all
man.eat(apple) // englishy SVO
eat(man, apple) // mathy VSO
// but with operators, you're limited to SVO, which is what math also traditionally uses for operators anyways
2 + 3
(+) 2 3 // doesn't exist in OO languages
Code: Select all
man `eat` apple -- works in haskell, but not elm
eat man apple -- note that in haskell and elm, the "subject" of the function/verb is traditionally the /last/ parameter of the function, not the first
eat apple man -- preferred style, because it makes making useful closures easier
2 + 3
(+) 2 3 -- useful when you need to pass the addition function to another function
But what about the order ? Why not instead write ? :Yeah, this could happen. I do some scripting for my job, and I can tell you I wouldn't want to type "means" instead of "=" every time I needed to assign something. It's 5x the work! (I didn't even feel like writing out "times" there.... crap. I just did...) "=" is an already available symbol that means something very close to what it's doing in programming, so why not use it? Also, when you're scanning code, I'd say that the "=" signs will just out a little bit from the surrounding text, making it easier to ready.
Code: Select all
= 21 myVar
(3) I think that "for" loops are awkward in most proglangs, and would probably have a different form if the programmers that created them had a different natlang phrase for what they do.