I understand that there are some types of delivery called reference delivery and price delivery, but I heard that some programming languages have a method called shared delivery.
It was my first time to hear the term myself, so I looked it up, but it didn't seem to be used very often (or rather, there are other ways to say it), and some articles said it was shared, reference price, or reference price.
Do you have any specifications or references to what is commonly referred to as shared delivery?
Read site
If I have such proper documents, I would like to use the name according to them...
programming-language
There are programming languages that describe the term "call-by-sharing, pass-by-sharing" in documents and specifications.Let me give you two specific examples.
CLU (quoted from CLU Reference Manual, PDF)
Argument passing is defined in terms of assignment, the formal arguments of a routine are considered to be local variables of the routine and are initialized, by assignment, to the objects resulting from the evaluation of the argument expressions. We call the argument passing technique call by sharing, because the argument objects are shared between the caller and the called routine.
Julia (quoted from Manual)
Julia function arguments follow a convention items called "pass-by-sharing", which means that values are not copied when they are passed to functions.
CLU (quoted from CLU Reference Manual, PDF)
Argument passing is defined in terms of assignment, the formal arguments of a routine are considered to be local variables of the routine and are initialized, by assignment, to the objects resulting from the evaluation of the argument expressions. We call the argument passing technique call by sharing, because the argument objects are shared between the caller and the called routine.
Julia (quoted from Manual)
Julia function arguments follow a convention items called "pass-by-sharing", which means that values are not copied when they are passed to functions.
However, I don't think it's a widely used word.For example, the English version of Wikipedia "Evaluation strategy" reads:
However, the term "call by sharing" is not in common use; the terminal is inconsistent across different sources.
Other than the languages listed above, there are programming languages that are equivalent to "shared delivery."
In this case, it is sometimes referred to as "reference value delivery" as a special case of price delivery, and Java's example is often a hit for searching in Japanese blog posts (Example).In the case of Java, The position is that all evaluation strategies are value-delivered.When passing a reference value above this, it is sometimes referred to as passing a reference value, meaning passing a reference value.I have the impression that the word "reference value delivery" is used more often than "shared delivery", especially in Japanese.
1In general, however, you should use this term "reference value passing" with care.One reason is that the word "reference" is troubling and has slightly different meanings depending on the programming language.
In Java, "reference" or "reference value" means a pointer to an object or a null pointer.Cited from Java SE12 specification JSR386:
An object is a class instance or an array.
The reference values (often just references) are pointers to these objects, and a
special null reference, which references to no object.
In C++98, reference is an alias to an existing object or function.Especially, it is different from the pointer.C++11 also adds the concept of rvalue reference.
In Java, a reference or reference value is a pointer to an object or a null pointer.Cited from Java SE12 specification JSR386:
An object is a class instance or an array.
The reference values (often just references) are pointers to these objects, and a
special null reference, which references to no object.
In C++98, reference is an alias to an existing object or function.Especially, it is different from the pointer.C++11 also adds the concept of rvalue reference.
This will change the specific behavior of passing a reference.
Another reason is that のreference passing 渡しis different from but the characters are similar and complicated.2.The following programs have different results:
2#Python-like pseudocode.
def(a):
a = [42]
l = [99]
f(l)
print(l)# What does this output show?
For these reasons, Personally,:
In particular, for the last point, in languages such as Java and Python, the function application specification only says value passing, and it also describes how data such as objects are treated as values.Personally, I think it's easier to understand if you think about it separately and add terms like this.
Order
I'll leave the detailed explanation to Nekketsuuuu, which is interesting in terms of "general", so I'll give you some additional information.
This is what Google Trend looks like.There is also a view like this when it comes to whether it's "general" or "everyone uses it."It can be used relatively when persuading others, so please refer to it
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
620 Uncaught (inpromise) Error on Electron: An object could not be cloned
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.