English 中文(简体)
What is the definition of an implementation detail? [closed]
原标题:

Closed. This question is off-topic. It is not currently accepting answers.


Want to improve this question? Update the question so it s on-topic for Stack Overflow.

Closed 10 years ago.

I see this term on the internet a lot (in fact, typing it on google returns a lot of results).

What is the exact definition of an "implementation detail"?

最佳回答

It s a behavior produced by code which may be relied on by consuming code, though that behavior is not specified by the spec the code is written to. Hence, other implementations of the same spec may not exhibit the same behavior, and will break that consuming code. That s why it s bad to rely on them.

For instance, if you were to write some code against a list interface which specified an array sort but not the algorithm it used, and you needed the sort method to be stable, and a version of your code was used with a non-stable sort algorithm, then your code would break.

问题回答

I m not aware of the exact formal definition of the term "implementation detail", it generally refers to the concrete implementation of a certain specification.

Take a List for example.

A specification of a List may say that "it is able to hold multiple values with duplicates while preserving order."

From the above, it doesn t mention what kind of backing data structure is used for the List -- for all we know, it may be an array, or a linked list. That is really an implementation detail that is really left up to the implementor of the List.

An "implementation detail" is a decision that is left to be made by the developers, and is not specified at an earlier level (such as a requirement document or, depending on context, an architectural document.)





相关问题
vectors vs. vector graphics

What (if any) is the relationship between vectors used in programming languages (e.g. arrays) and vector graphics? Why do they share the term vector? Does it represent some analogous aspect of their ...

MVC and Property Terminology in Objective-C

I am having a problem with terminology I think. Is a ViewController the Controller portion of MVC? Or is it not the same thing. Is this combining the VC of MVC into one file? Properties like ....

Origin of "map" in Computer Science

In computer science, there are two definitions of the word map. The first is as an associative array, a type of container that maps values of one type to values of another type. An example of this is ...

Definition of the word "patch"

Personally, I use the word "patch" as the software equivalent of a symptomatic treatment, which makes a patch a quick-and-dirty bugfix. However, I m not sure this is correct, because I often see it is ...

What is Facet in JavaEE?

I wonder not only what is Facet but also what is Facet in physical level (as I understand it s not a separate jar, but what?)? I also wonder how can it affect my application after deploying. I ll ...

What is the meaning of "POSIX"?

What is POSIX? I have read the Wikipedia article and I read it every time I encounter the term. The fact is that I never really understood what it is. Can anyone please explain it to me by explaining ...

Term for rotating header

I m looking for terminology that describes this behavior: The header of a web-page contains a different image every time you visit it. Update: It is not an advertisement, but images related to the ...

热门标签