terminology

Changes in terminology for Swift function parameter labels

谁都会走 提交于 2019-12-02 13:17:37
Swift provides the ability to give both an internal and external name/label for parameters of functions. But lately Apple seems to have resorted to only saying "Argument" and "Parameter" names/labels and dropped the use of internal/external to describe these things. In the Swift documents, and WWDC videos, there are a few unclear efforts to describe the difference between a function's parameters and arguments, without referring to these as the outward facing or internal, such as : Each function parameter has both an argument label and a parameter name. The argument label is used when calling

In Apple's Documentation for NSObject, what is the idea of the “receiver”?

走远了吗. 提交于 2019-12-02 05:08:07
问题 I'm researching Object-Oriented Programming in Swift and I figured a great place to start would be NSObject , since all objects inherit from this base class. In Apple's documentation for NSObject, there are areas that refer to a "receiver". Does "receiver" mean an instance of NSObject ? 回答1: It refers to Objective-c's paradigm of "sending messages" to objects. In that world, a "method" isn't REALLY a method, it's just the object saying, "Hey, if someone sends me this message (a string that

How are the terms “HEAD”, “head”, and “tip” different?

泄露秘密 提交于 2019-12-02 02:18:39
问题 Initial Understanding HEAD "indicates the head of the current branch." so, there is only one HEAD. head refers to the most recent commit of any branch. "...the most recent commit (or "head") of a branch..." so, there are as many heads as there are branches. tip refers to the most recent commit of any branch. so, tip is synonymous with head Please correct me if I'm wrong. Also, please provide documentation on the usage of "tip". New Understanding after Reading Answer Each branch points at a

How are the terms “HEAD”, “head”, and “tip” different?

淺唱寂寞╮ 提交于 2019-12-02 00:58:41
Initial Understanding HEAD "indicates the head of the current branch." so, there is only one HEAD. head refers to the most recent commit of any branch. "...the most recent commit (or "head") of a branch..." so, there are as many heads as there are branches. tip refers to the most recent commit of any branch. so, tip is synonymous with head Please correct me if I'm wrong. Also, please provide documentation on the usage of "tip". New Understanding after Reading Answer Each branch points at a commit. The head (or tip) is the commit at which a branch points. If there are ten branches then there

Does “resolve” consistently mean something distinct from “fulfill”?

邮差的信 提交于 2019-12-01 17:06:48
问题 (Related but not quite the same: JS Promises: Fulfill vs Resolve) I've been trying to wrap my head around Javascript promises, and I'm struggling with the basic notions of resolve and resolved , vs. fulfill and fulfilled . I have read several introductions, such as Jake Archibald's, as well as browsing some relevant specs. In States and Fates (not quite an official spec, but referenced as an authoritative document written by one of the spec authors), fulfilled is a state while resolved is a

What is an “import” called?

不羁岁月 提交于 2019-12-01 16:26:02
It is not a statement nor an expression. What is that called then? A directive? "declaration" See also JLS 7.5. Import Declaration 7.5.1 Single-Type-Import Declaration 7.5.2 Type-Import-on-Demand Declaration 7.5.3 Single Static Import Declaration 7.5.4 Static-Import-on-Demand Declaration It's called a Declaration . In the general scope, it is a directive. Within Java, classes have a tight relationship between their declaration and their containing file (known as a compiler unit in Java's architecture). However, the import statement pre-dates Java. When it was used in the C language, it was a

What's a naked pointer?

喜夏-厌秋 提交于 2019-12-01 15:18:36
Observing Naked Pointers (see the first reply), the questions is pretty simple: what is a Naked Pointer? Here's simple example: #include <memory> struct X { int a,b,c; }; int main() { std::shared_ptr<X> sp(new X); X* np = new X; delete np; } np is pointer to object of type X - if you have dynamically allocated ( new / malloc ) this object, you have to delete / free it... simple pointer like np is called "naked pointer" . sp is an object that holds a pointer to the managed resource, which means you can use it just like you would use np , but when there are no shared_ptr objects that own this

What does “ ~~ ” mean in Perl?

淺唱寂寞╮ 提交于 2019-12-01 14:57:50
In an SO answer daxim states: @array ~~ $scalar is true when $scalar is in @array to which draegtun replies: From 5.10.1+ the order of ~~ is important. Thus it needs to be $scalar ~~ @array How about a small primer on ~~ with link(s) to source(s) including the following specific questions: What is ~~ ? What is ~~ called? Why does the order matter in one version but not in a previous one? Note that a good summary may not get all the details and can be hard to write. An introduction or primer would be very useful to save time for someone unfamiliar with ~~ while expanding the exposure of this

What's a naked pointer?

柔情痞子 提交于 2019-12-01 14:53:56
问题 Observing Naked Pointers (see the first reply), the questions is pretty simple: what is a Naked Pointer? 回答1: Here's simple example: #include <memory> struct X { int a,b,c; }; int main() { std::shared_ptr<X> sp(new X); X* np = new X; delete np; } np is pointer to object of type X - if you have dynamically allocated ( new / malloc ) this object, you have to delete / free it... simple pointer like np is called "naked pointer" . sp is an object that holds a pointer to the managed resource, which

What is the reasoning behind the naming of “lvalue” and “rvalue”?

筅森魡賤 提交于 2019-12-01 14:47:45
What is the reasoning behind the naming of "lvalue" and "rvalue" in C/C++ (I know how they function)? The standard mentions this: An lvalue (so called, historically, because lvalues could appear on the left-hand side of an assignment expression) [...] An rvalue (so called, historically, because rvalues could appear on the right-hand side of an assignment expression) [...] That is, an lvalue was something you could assign to and an rvalue was something you could assign from. However, this has gradually gotten further and further from the truth. A simple example of an lvalue that you can't