Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a fully qualified name?

As far as I can tell, the term fully qualified isn't mentioned in the standard (e.g.), but I can recall "hearing" it many times online.

What do people mean when they say a name is fully qualified?

Does this count?

A::f()

or only this?

::A::f()

And, if it is standard, which wording have I not found?

like image 942
Lightness Races in Orbit Avatar asked May 23 '19 10:05

Lightness Races in Orbit


People also ask

What is fully qualified type name?

A fully qualified type name consists of an assembly name specification, a namespace specification, and a type name. Type name specifications are used by methods such as Type. GetType, Module. GetType, ModuleBuilder.

What does fully qualified file name mean?

The term fully qualified file name (or FQFN) means a file on a computer whose exact name is completely specified such that it is unambiguous and cannot be mistaken for any other file on that computer system.

How do I find my fully qualified name?

On your Windows PC, follow these steps to find your FQDN: Launch the Control Panel by searching for "Control Panel" in the Start Menu, or by typing Win+R and typing "control.exe" in the Run menu. On the System Information screen, you will see both the hostname and FQDN of your machine.

What is a fully qualified file name in Java?

"Fully-qualified path" is synonymous with "absolute path" "Fully-qualified" and "absolute path" mean the same thing - a path that is not relative to an implied or specified context.


2 Answers

An identifier that uses the scope resolution operator is a qualified name as per [expr.prim.id.qual]. Otherwise it is unqualified.

The standard doesn't define the meaning of fully qualified, but it does mention it in [library]/[requirements]/[organization]/[contents] which says (quote from standard draft)

Whenever a name x defined in the standard library is mentioned, the name x is assumed to be fully qualified as ::std::x, unless explicitly described otherwise. For example, if the Effects: element for library function F is described as calling library function G, the function ::std::G is meant.

Wikipedia defines Fully qualified name:

In computer programming, a fully qualified name is an unambiguous name that specifies which object, function, or variable a call refers to without regard to the context of the call

Only a name qualified starting from the global namespace is unambiguous without context. This is the common usage.

like image 122
eerorika Avatar answered Oct 05 '22 19:10

eerorika


Indeed, it is not a standard term. It has no definition in the standard.

However, the phrase "fully qualified" appears exactly once, in [contents] (15.5.1.1 "Library contents" in the as-of-writing most current draft N4800) paragraph 3:

Whenever a name x defined in the standard library is mentioned, the name x is assumed to be fully qualified as ::std::x, unless explicitly described otherwise.

So in this definition, only names starting with :: are fully qualified.

like image 33
Sebastian Redl Avatar answered Oct 05 '22 19:10

Sebastian Redl