• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Change in English Usage in Programming Over Time? What about other languages?

 
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tho this bugs me a lot, nobody else cares about it, I think, so it is posted here.

When I was a kid, it seemed that we universally used the phrase describing variable assignment in English as:

"(value) 5 gets assigned to (variable) v"
and
"...so, we assign 0 to x"
[alternatively "we assign v the value 5", "we assign x the value 0" basically, we "assign values TO variables", or sloppily we "assign variables values" not using the connecting word 'to']

I don't have all my notes, or all the many books I read, but somehow I just remembered that's the phrasing we always used, including tons of people who were just still learning English at the time.

Increasingly over the last ten years or so (it might have started a bit earlier before I noticed it) I hear or read in English:
"(variable) v gets assigned to (value) 5"

"...so, we assign x to 0"
[note that if both are variables, so someone is saying we assign x to y, my anxiety triples]

In all the inflected languages, the "man bites dog" problem is solved using inflection, so word order doesn't matter, and it is a matter of style.
But English dropped inflections way more than ten years ago, so word ordering is essential for meaning.

Which way does everyone phrase these in English and whichever other languages they speak?

This all reminds me of something funny that used to come up in text adventures when I was a kid, I still joke about it now.

> Feed the dog.

What would you like to feed the dog to?
===================
I still make that joke when told to feed my dog "Oh my God, are you sure?  To whom should I feed him?"
========================
> Feed the biscuit to the dog.

The dog eats the biscuit and looks back up at you, much more friendly.  Maybe he will let you pass now.
=====================================
While saying "Assign X to 5" has now become more or less the norm, it feels, sometimes people still say it what I think is the right way, which is far worse as far as I am concerned.
It reminds me in C/C++ of a function returning a value you should free 80% of the time, and something static or managed elsewhere 20% of the time.

So, to be honest, this actually unnerves me a lot.  It makes me sympathize, rather than just empathize, with those who have English as a not-so-close second language who work in English all week.

Note: sometimes this comes up in audio-only contexts, I am only 80% sure what they are typing as they say such words, unless one value is a constant.
 
Master Rancher
Posts: 3903
50
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm, interesting.  I think I use only "assign x to 5" rather than "assign 5 to x", and I believe the latter would stand out to me as wrong, if I heard it.  But probably it just autocorrects in my head without me realizing, at least in the many cases where only one of the two interpretations can possibly make sense.  While I share your frustration at ambiguous use of language, I can't recall noticing this as a problem, in general.  Though I'm sure there are some cases where there is genuine ambiguity without clear solution, I feel it's generally rare.  But, now I will be more on the lookout for it. .
 
Saloon Keeper
Posts: 13014
281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:While saying "Assign X to 5" has now become more or less the norm


Really? I don't encounter this a lot. Personally I would say and write "assign the value 5 to x". It's more common for me to hear "set x to 5", which I feel is correct, but I now am no longer sure of.

Maybe "assign x to 5" is a blend of the phrases "assign 5 to x" and "set x to 5"?

When I'm pair programming in Dutch, I will say (even though I realize it sounds completely stupid) "x wordt vijf", which literally means "x becomes five" or "x turns to five". I do this because it's much shorter than "wijs vijf toe aan x", and the word "wordt" clearly indicates that I mean the "=" operator and not the "==" operator; in the latter case I would say "x is vijf".
 
Sheriff
Posts: 16282
271
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've never seen "assign x to 5" when describing an assignment operation. The JLS and Java Tutorial consistently say "the value on the right side is assigned to the operand on the left side of the assignment operator. I've never seen it the other way around. Not sure where y'all got that.

https://docs.oracle.com/javase/tutorial/java/nutsandbolts/op1.html
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Junilu:
The literal quote I got from the tutorial page you linked was:
"it assigns the value on its right to the operand on its left"

I uniformly have always used that language since I was 13 at least, I believe even before but I had nobody to talk to about coding until I was 13, so I didn't really say stuff aloud.
I also didn't write about it, I just did it or thought about it.
All the way thru the 80's, 90's, 2000's and 2010's, I consistently used that terminology in English.

I didn't know "y'all" was in your vocabulary so I learned two things from your post.

Stephan:
While attending a conference in Den Haag in 1994, I chanced with friends into a hash bar...there was a sign that said "Wordt Lid!" (or possibly 'Wordt lidt!')

Everyone wondered what it meant, and I came up with a folk etymology on the spot that I now suspect was wrong.
Old hippies around New York called consumer-sized portions of that product "lid", supposedly because it was often distributed in film cannisters before I was born, and a reasonable portion of it would fit in the lid when inverted.  I had heard that term a few dozen or maybe 100 times.

"Word!!" was a common positive affirmation/strong agreement amongst the Black Community I grew up amongst.  I believed that it originally came from the more devout segments of their population, with a more serious sense more like 'Amen', but it was very commonly used whenever someone wanted to strongly agree with you, whether the assertion being agreed to was sacred, profane, vulgar, serious, somber or goofy.  It would also be used just to show something they strongly approved of had been mentioned, like 'Good!!'

So, after reminding the other people of this (it was an international group) I explained it must just mean "Great herb!" and everyone agreed, or at least, since none of them spoke Dutch, were happy to not have to think about the sign anymore.

Now you have me thinking I steered them all wrong.
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Set x to 5" and "set count to 0" would never confuse me in any situation.

I used the phrase I'd mentioned more often than this one, but it is totally unambiguous to me.

I sometimes hear/read those, it never bothers me.

I see the one that DOES bother me all the time, with what felt like increasing frequency over the past 10 to 15 years.
 
Saloon Keeper
Posts: 23774
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The English language is considered to be primarily an SVO language. That is, Subject, Verb, Object. "Man Bites Dog" unambiguously indicates that the biter is the man and the bitee is the dog. "Assign 7 to x" likewise. "Assign x to 7" would not be grammatical for most programming language environments. "this mislikes me" is an archaism.

SVO isn't universal, however. Some languages are SOV. "7 x assign". We may be seeing some leakage from places like that. Most programming languages run an OVS syntax for assignment expressions. If memory serves, command language for the IBM AS/400 computer was primarily a 3-element VSO. VSO is also common for command-line utilities: "dir x" (no object), "cp afile bfile".

I'm not well-versed in Latin grammar, but my understanding is that word affixes can serve in place of grammatical order there. English, however, has been losing affixes for many long years Too many other languages with conflicting or even no affix rules at all have gotten their fingers in and it's just easier not to bother.
 
Junilu Lacar
Sheriff
Posts: 16282
271
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:
[note that if both are variables, so someone is saying we assign x to y, my anxiety triples]


I don't know if this is what you were referring to but if it was, don't freak out but this is in the JLS (emphasis is mine):

There are 12 assignment operators; all are syntactically right-associative (they group right-to-left). Thus, a=b=c means a=(b=c), which assigns the value of c to b and then assigns the value of b to a.

 
Junilu Lacar
Sheriff
Posts: 16282
271
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:
I didn't know "y'all" was in your vocabulary.


Only at the Ranch. Ok, maybe sometimes IRL, too. I did live in Cincinnati, OH for a while, which is really close to this water tower: https://en.wikipedia.org/wiki/Florence_Y%27all_Water_Tower
 
Marshal
Posts: 73021
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:. . . "x wordt vijf" . . .

The traditional programming semantics chappies' pronunciation was, “x becomes equal to five,” which is similar to, “x wordt vijf.” The Deitel books occasionally say, “x receives the value of five.”
 
Tim Holloway
Saloon Keeper
Posts: 23774
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Junilu Lacar wrote:

Jesse Silverman wrote:
I didn't know "y'all" was in your vocabulary.


Only at the Ranch. Ok, maybe sometimes IRL, too. I did live in Cincinnati, OH for a while, which is really close to this water tower: https://en.wikipedia.org/wiki/Florence_Y%27all_Water_Tower



Oh, wow. I think I bougth a watch at that mall. I was up there back in the 80's for a training class, but since my dad's family centers around there, I did some visiting.
 
Stephan van Hulst
Saloon Keeper
Posts: 13014
281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:Now you have me thinking I steered them all wrong.


That was a great anecdote, but yes, I'm afraid I have to burst your bubble.

there was a sign that said "Wordt Lid!" (or possibly 'Wordt lidt!')


It probably would have read "Word lid!".

mood/personDutch inflectionEnglish inflection
full infinitive"worden""to become"
1st person singular"ik word""I become"
2nd person singular"jij wordt""you become"
3rd person singular"hij/zij/het wordt""he/she/it becomes"
1st person plural"wij worden""we become"
2nd person plural"jullie worden""you become"
3rd person plural"zij worden""they become"
imperative"word!""become!"


"Lid" is a noun that means "member", but it can also be used as a property: The property of being a member.

So "Word lid!" literally means "Become member!", or more accurately translated "Become a member!".
 
Stephan van Hulst
Saloon Keeper
Posts: 13014
281
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:The English language is considered to be primarily an SVO language. That is, Subject, Verb, Object. "Man Bites Dog" unambiguously indicates that the biter is the man and the bitee is the dog. "Assign 7 to x" likewise.


SVO doesn't apply though. Neither '7' nor 'x' is a subject in the phrase "Assign 7 to x". '7' is the direct object of the phrase, and 'x' is the indirect object.

This is why the word "to" is necessary: English doesn't have ordering rules for different kinds of objects.

It would be more difficult to read, but you can also say: "Assign to x, 7", or "To x assign 7".

I think you can't say "To x, 7 assign", because SVO says that the verb must go before the direct object.
 
Saloon Keeper
Posts: 4511
166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Word lid!" is what is called "commanding tone"("gebiedende wijs"). When saying this to a group of more than one person you add a "t" to "Word". If it should be "wishing tone"("aanvoegende wijs") you would get "worde lid"

Unfortunately, less and less Dutchmen remember or even know this. Since the 80's Dutch is getting more and more replaced by English. There is no office job anymore that does not have an English name. This I find a horrible development. fighting against it since the 80's. However, I feel like Don Quichot here.

An example that I see times and times again per day:
We learned at primary school the word "KoFSCHiP". Now, if we have a verb whose base ends in one of the consonants in this word, then the past participle will end in a "t", other wise in a "d". So we have "rennen -> ren -> gerend" and "staken -> staak -> gestaakt".

But then we have the internet-phrase "like me". In Dutch, the past participle is: "geliket". Now that really hurts the eye! The base part of "to like" is like, so it should be "geliked". Therefore, to get it in accordance with "kofschip" I suggested to write it as "gelikt". Unfortunately, "gelikt" means "licked". The nightmare goes on and on...
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems that the sign that I misinterpreted was meant to say "Become a member, y'all!!" or perhaps more metaphorically "Join us!"?

That is even less important, except to show that we are dealing with someone so weird that they remember a sign they saw once on a casual outing almost 27 years earlier.

Folk etymologies are wrong notoriously often, I have read several books -- countless words in languages are simply "wrong" because whoever got there first made a mistranslation, e.g. the name of the "sine" function, which was coined by https://en.wikipedia.org/wiki/Gerard_of_Cremona because he didn't realize the Arabic he was translating when bringing trigonometry into Latin was itself writing a transliteration of Sanskrit, so I am in good company:
https://mydominanthemisphere.wordpress.com/2009/08/27/the-story-of-sine/

The way I learned it, he looked at the 'jb' and guessed it meant the arabic word for 'bay' or 'cove', hence 'sinus' --> 'sine' in latin, but whichever, he didn't realize he was translating a phonetic spelling of another language without the vowels...

The Etruscan name Antony (etymology unknown) was 'corrected' to Anthony in English and many other languages because people thought they saw the word for 'flower' (anthos) so put the h back in that they imagined someone had accidentally omitted.

Those are way less important than my original point, where I think I am correct now, due to the preponderance of posts, but it seems to be a lost cause.

I was not concerned about a = b = c (tho I believe both Dijkstra and Wirth detested that as well), but rather when both are valid lvalues, saying 'assign x to y' becomes truly ambiguous.  It could mean they are reading/thinking 'x=y' or maybe it is 'y=x'. Sometimes I am watching a video that some might be listening to audio-only and just think "UGH!!"  Bad enough that Linux and Windows disagree about how to write x64 assembly (dest, src) or (src, dest)...now all programming languages contain the ambiguity due to sloppy speech.

As OCD as I can sometimes get, when there is no actual ambiguity I just eat it and move on -- people are truly using these word sequences to mean two different things, 'the correct one' which used to be almost universal, and 'the wrong one' which I am asserting in this thread that has become pre-dominant (but not among myself or most of the people here).

The original sticklers were all Algol people, like Wirth and Dijkstra (hey, more Dutchmen the merrier!) who hated using = for assignment (In 1977 or so one of them said,

400 years ago we started using = to mean equal (Recorde first proposed the equal sign in a 1557 book named The Whetstone of Witte, in which he says,

"And to avoide the tediouse repetition of these woordes: is equalle to: I will sette as I doe often in woorke use, a paire of paralleles, of Gemowe (or twin) lines of one lengthe, thus: = = = = = =, bicause noe 2 thynges can be moare equalle."

, and in 1957 we stopped

-- they were angry at FORTRAN) and always preferred 'x := y' which I believe they always pronounced 'becomes equal to' in English.

My conclusion, saying 'assign x to 0' is simply wrong, but far more than enough people have started saying it that I can no longer trust that 'assign y to x' means 'x = y'.  I certainly can't trust it to mean the opposite either, it varies depending upon the whim of the speaker/writer.  UGH.
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mike Simmons wrote:Hmmm, interesting.  I think I use only "assign x to 5" rather than "assign 5 to x", and I believe the latter would stand out to me as wrong, if I heard it.  But probably it just autocorrects in my head without me realizing, at least in the many cases where only one of the two interpretations can possibly make sense.  While I share your frustration at ambiguous use of language, I can't recall noticing this as a problem, in general.  Though I'm sure there are some cases where there is genuine ambiguity without clear solution, I feel it's generally rare.  But, now I will be more on the lookout for it. .



Mike, if you actually do that, thanks for proving my point.
I think of you as a better programmer than myself, and there you go, demonstrating that some great programmers who are notoriously clear and effective in most writing will 'default to the wrong version' of this phrase.  I feel like the first time I noticed it might have been Bruce Eckel (who is also a better programmer than myself, tho it might have been a chapter written by Chuck Allison, also a better programmer than myself)...I think I wrote to them about it, but hoped it was a one-off and then stopped thinking about it until I saw both ways used so many times (with the percentage apparently trending sharply to the wrong one) that I wrote this post.
 
Stephan van Hulst
Saloon Keeper
Posts: 13014
281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

When saying this to a group of more than one person you add a "t" to "Word". If it should be "wishing tone"("aanvoegende wijs") you would get "worde lid"


Both of these uses are considered archaic. You would only use them in old sayings, not in normal usage.

Unfortunately, less and less Dutchmen remember or even know this. Since the 80's Dutch is getting more and more replaced by English.


While I understand the resistance against replacing words in your language with equivalent words from other languages, the loss of inflection in Dutch for the imperative and subjunctive moods is just natural language evolution. Language purists seem to forget that we wouldn't have Dutch in the first place if it didn't evolve from older languages. Not only that, but "We've always done things this way" to me is the logical fallacy that all backwards reasoning is based on.

If this annoys you, wait until you find out that the phrase "Ik ben groter als jij" is no longer considered grammatically incorrect when used informally. It's only a matter of time before it becomes completely accepted in written text as well.

But then we have the internet-phrase "like me". In Dutch, the past participle is: "geliket". Now that really hurts the eye! The base part of "to like" is like, so it should be "geliked".


No. The rule doesn't apply to the letter that the stem of the verb ends with. The rule applies to the sound that the stem of the verb ends with. That's why it's also "heb geracet" ("have raced"), and "heb geüpdatet" ("have updated"). The stems "race" and "update" end in the sounds "s" and "t", which are both in "'t kofschip".

Therefore, to get it in accordance with "kofschip" I suggested to write it as "gelikt". Unfortunately, "gelikt" means "licked". The nightmare goes on and on...


Not only that, but I think it looks even less like the way you pronounce it than the spelling we use now.

Dutch is a very phonetic language. We completely butcher the spelling of foreign words to make them fit with our pronunciation. One of my favorite examples is the Dutch exonym for the "Czech republic", which is "Tsjechië". For some reason this trend stopped in the internet age. If it were up to me, I would spell "geliket" as "gelaikt", "geracet" as "gereest" and "geüpdatet" as "geüpdeet".
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

No. The rule doesn't apply to the letter that the stem of the verb ends with. The rule applies to the sound that the stem of the verb ends with.



Like a/an in English.  This breaks things when people pronounce "y" as a vowel instead of a consonant.

I am watching a course where the instructor pronounces 'yield' like 'eeled' or 'ieeled', and 'yak' like 'eeiak'...I haven't noticed him needing to prefix any of those words with an indefinite article....eeiet.

I understand all languages evolve, and that Conservatives often view this as 'De-evolution" or Devolution, the origin of the band name Devo.

This does affect computer languages too.  In particular I have seen old-timer's ranting and raving at the huge changes in Java 8 and in C++ 11, 14, 17, 20 and 23...Python had more acrimony than I could ever have imagined moving from version 2 to 3...

I like to think that all the things I freak out over are legitimate ambiguities that lead to different people saying the same things and meaning something different, tho I am also not enamored of coming up with pointless new ways to say the same thing we already had a good phrase for, but if one-to-one mappings are preserved, I just deal with it.

In fact, even if the same words/phrase comes to mean two different things, I am forced to 'just deal with it', but do continue worrying about it.

Unambiguous sayings that I consider to be grammatically incorrect I also just deal with.
I swear my first 15 years programming, saying "in the below code" and "in the above code" would have been perceived as saying something like "Why you be tripping?" which was a common phrase where I grew up -- simply non-standard English.  We would have said "in the code seen below" or "in the code snippet referenced above".  Both 'the below code' and 'the above code' have become so common to see I barely even notice them now, but as there is no ambiguity, I don't mind.

I complained when some primary German speakers were using the phrase "may not" to mean "may or may not" in their technical material (implying that you probably expect something but it may not always be the case) because in American English at least, many will use the 'may not' phrase to mean 'must not'.  They insisted that such a usage is so wrong that they weren't willing to write the extra two words, or my other suggested alternative 'might not'.  I persist in believing that in some sentences it is hard to know for sure whether the words are a proscription or just a statement that things could go either way, unless you already knew what the sentence was trying to tell you and did not need to read it.  There are plenty of legal documents where 'you may not X' is warning that you may later get in trouble if you do such a thing, even if I would prefer to see "must not" written in all such places.
 
Stephan van Hulst
Saloon Keeper
Posts: 13014
281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:I complained when some primary German speakers were using the phrase "may not" to mean "may or may not" in their technical material (implying that you probably expect something but it may not always be the case) because in American English at least, many will use the 'may not' phrase to mean 'must not'.


I think it's very weird that they would feel this way. They were probably confused. I would translate "you may not" to German as "mann darf nicht", which has the exact same meaning of "if you do it anyway, bad things will happen".

If anything, I find "you must not" the problematic phrase. Many people interpret it as "if you do it anyway, bad things will happen", while the literal meaning is "you are not required to".

It's funny you came up with this example, because just recently I had to think about this long and hard. I used to write this code snippet a lot:

A valid reply to this exception message could be: "Okay, it must not, but it might!"

For this reason, in all new code I write, such a null check looks like this:

This usage is clear and unambiguous.
 
Saloon Keeper
Posts: 6994
164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would note that there is an imbalance between "you may not" and "he may not". As Stephan says, the former is another form of saying "you must not" - interpreting it any other way would be a stretch. But it's not such a stretch to interpret the latter as "he might not", indicating an optionality (which, BTW, the RFC editors state explicitly in #5).
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:

Jesse Silverman wrote:I complained when some primary German speakers were using the phrase "may not" to mean "may or may not" in their technical material (implying that you probably expect something but it may not always be the case) because in American English at least, many will use the 'may not' phrase to mean 'must not'.


I think it's very weird that they would feel this way. They were probably confused. I would translate "you may not" to German as "mann darf nicht", which has the exact same meaning of "if you do it anyway, bad things will happen".

If anything, I find "you must not" the problematic phrase. Many people interpret it as "if you do it anyway, bad things will happen", while the literal meaning is "you are not required to".

It's funny you came up with this example, because just recently I had to think about this long and hard. I used to write this code snippet a lot:

A valid reply to this exception message could be: "Okay, it must not, but it might!"

For this reason, in all new code I write, such a null check looks like this:

This usage is clear and unambiguous.



Hmmmm...I have an extremely high opinion of you from all the posts I've read, to the extent that I feel awkward ever disagreeing with you on anything that might have a right answer, that I am likely wrong.

i.e. We can have different favorite flavors or favorite songs, or favorite dwarves from LOTR, but my mind throws an exception whenever I am ready to have a technical disagreement with you.

I feel that most of the full-time professional programmers I've worked with, and certainly most of the adults I know who have grown up in the States, would be less likely to be confused by the first one.  Yes, amongst people who use 'who' and 'whom' correctly, perhaps, the subtle meaning of 'must not' may be as you described (can go either way) which wouldn't make sense in an exception, as there would be no problem.  "The thing may not be null" would sound to a decent number of people like you used some heuristic or test, and your code fears that the thing may not (might not) be null, even tho at this point it should be.  Note that there are messages that come out from some systems of that form, such as the phrasing for possibly uninitialized variables in some implementations of some languages.  

The local variable i may not have been initialized



If a car was going to crash or a pacemaker was going to lock up in someone's chest if somebody read it wrongly, I would say: "Null value for <thing> is invalid" or "Invalid: Null Value for <thing> not allowed".

They beat the idea to death on the CBS show "Scorpion" that when common usage often deviates from strict correctness, it is better to follow normal usage.  The geniuses on the Scorpion team did not like that.

I was trying to steer the Germans away from the rocky phrase "may not" in places that they meant "may or may not" (but the reader probably expected the affirmative anyway, so they made it shorter).  In the places I was complaining about, if you already knew whether it was an advisory that either option could happen, or a prohibition against/warning of an attempt at an invalid option on behalf of the developer--then you didn't need to read the sentence in the first place.  I would prefer to just stop using the words "may not" in English because there are the two ways highlighted that different people may interpret them.  People may not understand you correctly.  [notice again, 'may or may not' works great for me there, I am only allergic to 'may not' in isolation without may in front of them as too ambiguous]

Now you remind us that "must not" actually means "is not required to", but I feel few programmers (and fewer average folks) recognize that.  However, the phrase "You must not want anyone to use this software, because it is so hard to use" shows a common use of the phrase "must not" in general English.  It isn't a command, but rather announcing the results of an inference made by the speaker.  Most of the rest of the times people say or write it, they intend to denote a prohibition, or at least a warning of likely bad consequences (like a stronger version of "should not")...

I begin to question whether this even belongs in the "Meaningless Drivel" forum.  "Effective English (and other language) for Programmers" seems to be an appropriate, and often ignored technical topic.

I am very verbose in these forums, but I like to think that when writing messages to users, I am attempting to solve a minimization problem -- where I am minimizing the chances that the reader won't understand what the message means, or, just as importantly, will have some idea about how to go about fixing it.  I have complained about dozens of error messages in commercial code that I was working on, i.e. that they were confusing, I think about half or so were re-worded, sometimes to my suggestion, sometimes to a neutral third option that confused nobody as to its meanings in quick informal tests...
 
Tim Holloway
Saloon Keeper
Posts: 23774
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:

Tim Holloway wrote:The English language is considered to be primarily an SVO language. That is, Subject, Verb, Object. "Man Bites Dog" unambiguously indicates that the biter is the man and the bitee is the dog. "Assign 7 to x" likewise.


SVO doesn't apply though. Neither '7' nor 'x' is a subject in the phrase "Assign 7 to x". '7' is the direct object of the phrase, and 'x' is the indirect object.



Not so. "7" is the subject. If you prefer, you can read it as "the (numeric) value 7".

Stephan van Hulst wrote:
I think you can't say "To x, 7 assign", because SVO says that the verb must go before the direct object.


yoda wrote:Doing it all the time, I am.


 
Mike Simmons
Master Rancher
Posts: 3903
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:

Stephan van Hulst wrote:
SVO doesn't apply though. Neither '7' nor 'x' is a subject in the phrase "Assign 7 to x". '7' is the direct object of the phrase, and 'x' is the indirect object.



Not so. "7" is the subject. If you prefer, you can read it as "the (numeric) value 7".



No, "7" is the object of the verb "assign".  "x" is the object of the preposition "to".  The subject, given an imperative verb, is the implied "you".

Compare:

A assigns B to C.  -- Subject: A, object of "assigns": B, object of "to": C

You assign B to C.  -- Subject: "You", object of "assigns": B, object of "to": C

Assign B to C.  -- Subject: implied "You", object of "assigns": B, object of "to": C


I do, however, fully endorse the Yoda quote.
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At slightly different times Mike said:

A assigns B to C.  -- Subject: A, object of "assigns": B, object of "to": C

You assign B to C.  -- Subject: "You", object of "assigns": B, object of "to": C

Assign B to C.  -- Subject: implied "You", object of "assigns": B, object of "to": C


and:

 I think I use only "assign x to 5" rather than "assign 5 to x", and I believe the latter would stand out to me as wrong, if I heard it.



Does that mean that you think you were indeed doing what you originally said, and I keep hearing and reading all over the interwebs, but have now jumped on the bandwagon that the 'to' always goes before the destination and after the 'assign' source?

The old Infocom text adventures used to use the term direct object and indirect object.
I learned as much grammar from those as from school...

When I have looked at languages that have serious grammar, like German/Russian/Greek, I continue to keep the terms 'direct object' and 'indirect object' in my head, hopefully correctly.

Give the gold bar to the Troll.

Direct object -- gold bar
Indirect object -- troll.
 
Tim Holloway
Saloon Keeper
Posts: 23774
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What, you would deny free will to 7 just because it's a number? For shame!

Anyway, "you" isn't the real subject. The real subject is "program". I don't plan to be anywhere near the scene of this crime.

Regardless, that just makes it SVO, as most English is.
 
Campbell Ritchie
Marshal
Posts: 73021
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:. . . . Neither '7' nor 'x' is a subject in the phrase "Assign 7 to x". '7' is the direct object of the phrase, and 'x' is the indirect object. . . .

“to x” isn't an object at all, but an adverbial phrase taking the place of the indirect object, and assign tends to take one object, so people would say that. The indirect object usually precedes the direct object if there are two objects, so it would read, “Assign x 7,” (ouch) or, “Give the troll the gold bar.” (OK)
 
Campbell Ritchie
Marshal
Posts: 73021
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:. . . "you" isn't the real subject. The real subject is "program". . . .

You (!) are here addressing the program as “you”. Or, “You, program.....”
 
Mike Simmons
Master Rancher
Posts: 3903
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:Does that mean that you think you were indeed doing what you originally said, and I keep hearing and reading all over the interwebs, but have now jumped on the bandwagon that the 'to' always goes before the destination and after the 'assign' source?


No, in that section I wasn't commenting (or thinking) about what "assign" meant, whether B points to C or C points to B.  I was talking about the grammatical role of the subject and objects.  A B and C were placeholders for whatever nouns you want, not variable in the programming sense.

Jesse Silverman wrote:
Give the gold bar to the Troll.

Direct object -- gold bar
Indirect object -- troll.


No, because you use a preposition before troll, it's not an indirect object; it's the object of a preposition, which is similar but different.  An indirect object example would be:

Give the Troll the gold bar.

Direct object -- gold bar
Indirect object -- troll.

As we see, it's similar in function to the prepositional phrase in your example, but it has a different word order.  The prepositional version can be more specific, in that we get to choose a specific preposition, which may be useful (to vs from, for example).

I do accept that "direct object" is the more standard term for what I called "object of the verb".

I see Campbell posted about an "adverbial phrase" - I would call it a prepositional phrase.  Perhaps that's a US/UK difference?

Object (grammar) types

Tim Holloway wrote:What, you would deny free will to 7 just because it's a number? For shame!



To get free will, 7 should follow the example of 6 and assert that it's not a number.  Though that still may not convince 2.
 
Mike Simmons
Master Rancher
Posts: 3903
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Tim Holloway wrote:. . . "you" isn't the real subject. The real subject is "program". . . .

You (!) are here addressing the program as “you”. Or, “You, program.....”



Or sometimes, "You %@#$ing program, do what I told you to do!!!"

Or maybe that's just me.
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't expect to learn English Grammar in here, yet I have.

Interestingly enough, in 1981 (and probably 1980), both:

> Give the gold bar to the troll.

and

> Give the troll the gold bar.

worked equally well...well, not so well...
`The troll accepts your gift, and not having the most discriminating taste, eats it.`
 
Campbell Ritchie
Marshal
Posts: 73021
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mike Simmons wrote:. . .
"You %@#$ing program, do what I told you to do!!!"
. . ..

Hahahahahahahaha!

Remember that the computer does what you tell it to do, not what you want it to do.
 
Campbell Ritchie
Marshal
Posts: 73021
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:

Jesse Silverman wrote:. . . "may not" to mean "may or may not" . . .

. . . I would translate "you may not" to German as "mann darf nicht". . . .

Lots of native English speakers get that wrong; confusing may not and might not.
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Lots of native English speakers get that wrong; confusing may not and might not.



So does that mean that we may not want to rely on using these exact words in software messages and documentation, or that we might not want to rely on them?
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:

Jesse Silverman wrote:I complained when some primary German speakers were using the phrase "may not" to mean "may or may not" in their technical material (implying that you probably expect something but it may not always be the case) because in American English at least, many will use the 'may not' phrase to mean 'must not'.


I think it's very weird that they would feel this way. They were probably confused. I would translate "you may not" to German as "mann darf nicht", which has the exact same meaning of "if you do it anyway, bad things will happen".

If anything, I find "you must not" the problematic phrase. Many people interpret it as "if you do it anyway, bad things will happen", while the literal meaning is "you are not required to".

It's funny you came up with this example, because just recently I had to think about this long and hard. I used to write this code snippet a lot:

A valid reply to this exception message could be: "Okay, it must not, but it might!"

For this reason, in all new code I write, such a null check looks like this:

This usage is clear and unambiguous.



Hi Stephan:

At the risk of beating a dead moose, I just realized that I think that way more people would recognize "needn't" or "need not" to mean "maybe you thought you needed to, but actually you don't" as in:
"You needn't sort the ArrayList to generate the answer, as it is already guaranteed to be partitioned with respect to the value you care about."

than would:
"You mustn't sort the ArrayList..."
where many would think that some disaster would strike if you did, rather than just some wasted cycles...

So even tho the people who are careless with speech writing and grammar don't care about any of these things, lots of people understand  the true meaning of "need not" compared to the number that think "must not" is anything but a prohibition or dire warning.

I needn't have mentioned this and you needn't reply, because I think saying "Invalid null value for X" or "Null Value for X invalid at" would be understood by near 100% of people.
I would say my hierarchy of needs in messages:
1. Maximum %age of people understand what it means :: Minimum %age of people mystified or incorrectly guessing at its meaning.
2. Sounds cool and flows well.
3. Proper grammar

It is nice when you can get all three, but certainly English has three things going against it:
1. So many ways of saying things, including weird dialects!
2. So many ambiguities (see #1).
3. So many people working with it that have English as a second, third, or sometimes fourth language...(see #1 and #2 again)

When I evaluated error messages I was writing or complaining about in commercial software, the peer group doing the review like as not had more people who went thru University in a language other than English than in English, so the consensus was always balanced between native speakers and ESL/ETL speakers.
 
Campbell Ritchie
Marshal
Posts: 73021
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:. . . "needn't" or "need not" . . .

Round here it means something is unnecessary, but not prohibited.

"must not" is anything but a prohibition or dire warning. . . . .

And round here, mustn't is a prohibition and never a warning. It may be accompanied by a warning: “You mustn't annoy that wasp or it will sting you.”
 
Stephan van Hulst
Saloon Keeper
Posts: 13014
281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:I have an extremely high opinion of you from all the posts I've read, to the extent that I feel awkward ever disagreeing with you on anything that might have a right answer, that I am likely wrong.


Hah, I feel flattered, but you mustn't (see what I did there?) feel that way. I have lots of discussions with Tim Holloway on here, and more often than not he points out a big fat mistake in my reasoning.

I feel that most of the full-time professional programmers I've worked with, and certainly most of the adults I know who have grown up in the States, would be less likely to be confused by the first one.  Yes, amongst people who use 'who' and 'whom' correctly, perhaps, the subtle meaning of 'must not' may be as you described (can go either way) which wouldn't make sense in an exception, as there would be no problem.  "The thing may not be null" would sound to a decent number of people like you used some heuristic or test, and your code fears that the thing may not (might not) be null, even tho at this point it should be.  Note that there are messages that come out from some systems of that form, such as the phrasing for possibly uninitialized variables in some implementations of some languages.


The funny thing is, even before I read this I read back my own post and something didn't feel right. I feel that both "may not" and "must not" can now go both ways. You've fully confused me, if I haven't already confused myself.

I have complained about dozens of error messages in commercial code that I was working on, i.e. that they were confusing, I think about half or so were re-worded, sometimes to my suggestion, sometimes to a neutral third option that confused nobody as to its meanings in quick informal tests...


I do this too with our interns and sometimes our more experienced programmers, but in those cases there usually isn't any backtalk, because I think I'm the only native English speaker there (I was raised bilingually). That said, I'm not a professor of English.
 
Campbell Ritchie
Marshal
Posts: 73021
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:. . .
high opinion
. . .

Yes, we all have a high opinion of Stephan.

I feel awkward ever disagreeing with you
. . .

Look:-

Proverbs 27: 17 (AV) wrote:Iron sharpeneth iron;
    so a man sharpeneth the countenance of his friend.

When I was still working for my PhD, German Frank got into a disagreement with Steve (both were my supervisors for some of the time). After the disagreement was settled, Steve commended Frank for disagreeing. Disagreements allow us to deepen our knowledge, particularly if handled politely, even if we turn out to be mistaken and have tto acknowledge our mistakes. And I have found that it does no harm to acknowledge a mistake.
 
Marshal
Posts: 26626
81
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:I feel that both "may not" and "must not" can now go both ways.



Yes... "You may not X" can mean "You are not permitted to X" ("You may not come in") or "It is possible that you do not X" ("You may not have seen this document"). Similarly "You must not X" can mean "You are not permitted to X" ("You must not open that box until Christmas") or "It appears to me that you, surprisingly, do not X" ("You must not have opened the box or you would have known"). I notice that my examples are in present tense for one meaning and past tense for the other, and maybe that's the source of the difference.

There's also the issue of "may" versus "might", which isn't going to come up in the context of programming languages much. I find that many people today use "may" where I would use "might" and I suspect that's because usage has changed over time and I haven't. Or it might be because I learned the difference when I spoke British English and the examples I'm looking at are in American English. Or all of those. Probably it's possible to treat them as synonyms in most or all situations now.
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lots of good thought put in here, more than I expected.

Does it seem we have a consensus on the original point tho?

pronouncing 'x = 5;'

Best (nobody will be confused):
   assign the value 5 to x
   set x to 5

Good (Few will be confused):
   assign x the value of 5
   set x equal to 5 (the purists hated this but wanted := as the operator not =)

Ok:
  assign x 5

Bad (my complaint):
  assign x to 5 # why?  If instead it is 'assign x to the value of y' intended to mirror 'set x to y' it is sort of long and clunky, if you just say 'assign x to y' which is short, now it sounds to me like you are saying 'y = x' which is not what you mean, but rather the opposite.

People can say "I didn't notice many people doing the Bad thing you keep complaining about."  Maybe not on this site, but I encounter it all over the place elsewhere, in what feels like an increasing amount.  From self-taught programmers (who may be doing free videos or even teaching courses), but also occasionally from accredited C.S. instructors affiliated with accredited institutions.  if the text is on the screen I can make out what they mean (if I can read the text), but it still is one more thing to memorize about someone's dialect which used to not be necessary, as we all said the phrase the same way around.  If they send "Wokka, wokka wokka wokka!!" and I could read the text on the screen I would also be fine, but that would be funny instead of stressful.

I think I am cooked to mush on the issue, but I may add to this thread with examples of "Otherwise Great instructional Material Which Features the Confusing Wording Consistently (within itself)".

Thanks, everyone!
 
Jesse Silverman
Ranch Foreman
Posts: 484
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I lied, or, that is done, but there is a somewhat independent, but overlapping source of confusion, especially when jumping from language to language (many people doing tutorials and helping beginners are in several languages).

I was mostly thinking about primitives in all the discussion so far.

But "assignment" has different semantics when applied to value types and references (to mutable and immutable types).

In Java/C++/C# (what I was talking about)

int x = 5;
int y = 3;

y = x // same value, but variables remain fully independent

references to immutable types:
String s1 = "Woof";
String s2 = "Meow";

s1 = s2;
//now both point to the same immutable object (for now), in Python (s1 is s2) == True

s1 += "something more" // now they don't, but the reference changes, not the object

Integer I1 = 3;
Integer I2 = 5;

I2 = I1; // the same value for the moment
...
++I2; // auto=unboxing/boxing, now they are independent references to different heap objects...looks similar to value types, I guess works the same too...

Some things are mutable:
jshell> var sb1 = new StringBuilder("Hello");
sb1 ==> Hello

jshell> var sb2 = sb1 // same mutable object
sb2 ==> Hello

jshell> sb2.append(" Sailor");
$18 ==> Hello Sailor

jshell> sb1
sb1 ==> Hello Sailor

So there is a whole different can of worms opened up when we need to be paying attention to whether we are dealing with pure value types, or references to immutable types, or references to mutable types that may get the underlying values changed...

leaving aside C++'s even more complex:
int j = 5;
int& jref = j;
++jref;  // j  is now 6


I definitely see people being confused in Python by what assignment even means where all types are reference types, either mutable or immutable, and people trying to explain that an assignment is just 'giving a new name to something'...if someone only does Python it is one thing, but if they are going back and forth from another language that has primitive value types, all the verbiage gets a little confusing for the easily confused.

In NumPy there are a million ways to get confused about whether a method gives you back an independent copy of the underlying ndarray, or an independent view of the same underlying data.  There are some operations that tell you that "they give you back a view of the same underlying array, except when they can't..." -- this requires attention while learning NumPy

This isn't well thought out yet, the point is just that there may be other complications in saying x = y as  "Assign the value of y to x" when dealing with mutable and immutable reference types, I wasn't thinking about those in this thread.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic