Hosts and implementations

section 4.2

It seems like "implementation-defined" (and also "implementation-approximated") things must be defined somehow by implementations, because the definition of those terms say "one that defers its definition to an external source".

But then... in the definition for host-defined, it is implied that implementations can also be hosts:
"Implementations that are not hosts may also provide definitions for host-defined facilities."

Hmm... how can something be both a host and an implementation? Thought process:

  • Implementation defined or approximated facilities have to be defined by implementations
  • A host cannot define those facilities
  • The only way an implementation can also be a host is if it doesn't define those facilities.
  • But then if an implementation doesn't define those facilities, what does?
  • Oh I get it, "host" is a subset of "implementation".
  • So "implementations that are not hosts" define "implementation-defined" facilities.

Even though I understood at the end, I still think it's confusing.
Especially since the last sentence of section 4.2 says

"Both hosts and implementations may interface with this specification via the language types, specification types, abstract operations, grammar productions, intrinsic objects, and intrinsic symbols defined herein."

even though as mentioned, "host" is a subset of "implementation", right?

Is it possible for a host to not be an implementation? I don't see how it could be. What am I missing?

(The definitions make it seem that an implementation is just a host, but which could also define implementation-defined / implementation-approximated facilities)

Maybe V8 would be an example of an implementation.
Chrome and Node are examples of Hosts that both use the V8 implementation.

I could be wrong.

1 Like

Yeah, I can see how there would be some confusion there. It may make sense to change the definition of "implementation" to say that an implementation must provide definitions for all implementation-defined and implementation-approximated things; then hosts and implementations would be distinct sets.

1 Like