• 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
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

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

 
Marshal
Posts: 73252
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

Integers are immutable in Java® and values created by boxing may reuse objects if within a certain range. Yes, I think that is a value type. Everything may differ in different languages; I don't know enough to know what the differences are.
 
Ranch Foreman
Posts: 623
13
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Regarding:


If we would pronounce this as "Assign I2 to refer to the value currently referred to by I1", which is increasingly something someone would be attempting to say, perhaps this is what caused their verbiage to shift to:


How does everyone pronounce the I2 = I1 operation in the first example?  I will adopt that phrasing in the interest of community consistency.

In languages like Python that don't have primitive types as built-ins at all, you are essentially always doing that first operation all the time.
They might have switched their terminology in Python and then started back-applying it to Java/C++/C# even when dealing with primitives.

I am not sure, but I think all of the people I've heard say this do Python or Ruby or some other language with no primitive types, and apply the same pronunciation to primitive operations in Java/C#/C++.
 
Marshal
Posts: 26696
81
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assign 3 to I1.
Assign 5 to I2.
Assign I1 to I2.

Yes, I know that the third statement is describing a more complicated situation than the other two, but the end result is that it assigns a value to the variable I2. There's generally no need for me to go into the details of how the assignment works right away, although it might be important to discuss that later if it becomes a point of confusion.

Although you will have noticed that I'm a "terse" person whereas you aren't. So we differ about how to describe things which appear simple but have a bunch of annoying complexity hidden beneath.
 
Jesse Silverman
Ranch Foreman
Posts: 623
13
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've decided that what is likely happening is that people also working in dynamic scripting languages see:

I2 = I1

as assigning another name or alias (Python explicitly does not use the term alias, but just name, even when aliasing) of I2 for the value which exists somewhere and is currently referenced by the name of I1.

So, assign (the name) I2 to (be another name for what is referenced by) I1.

They then carry that verbiage back to languages with primitives and call:
i2 = i1;

"assign i2 to i1"

Whether I am right or wrong on that guess, I don't like it much but have to deal with it, or just ignore all such sources, which cuts out too much from my diet, so too bad.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic