New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is Realm always capitalized? #252

Closed
domenic opened this Issue Dec 15, 2015 · 9 comments

Comments

Projects
None yet
4 participants
@domenic
Member

domenic commented Dec 15, 2015

It seems weird. It's not a proper noun.

@anba

This comment has been minimized.

Show comment
Hide comment
@anba

anba Dec 15, 2015

Contributor

If "Realm" is used to refer to the schema of the Realm record type, it needs to be capitalized. Similar to other named schemata like PropertyDescriptor, Completion, Reference etc.

Contributor

anba commented Dec 15, 2015

If "Realm" is used to refer to the schema of the Realm record type, it needs to be capitalized. Similar to other named schemata like PropertyDescriptor, Completion, Reference etc.

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Dec 15, 2015

Member

Agreed. But it almost never is.

Member

domenic commented Dec 15, 2015

Agreed. But it almost never is.

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Dec 15, 2015

Member

Hmm, I think it always is? When is it not?

Member

bterlson commented Dec 15, 2015

Hmm, I think it always is? When is it not?

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Dec 15, 2015

Member

Before it is evaluated, all ECMAScript code must be associated with a Realm.

well-known symbols values are shared by all Code Realms

Well-known intrinsics are built-in objects that are explicitly referenced by the algorithms of this specification and which usually have Realm specific identities.

A few others I think...

Member

domenic commented Dec 15, 2015

Before it is evaluated, all ECMAScript code must be associated with a Realm.

well-known symbols values are shared by all Code Realms

Well-known intrinsics are built-in objects that are explicitly referenced by the algorithms of this specification and which usually have Realm specific identities.

A few others I think...

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Dec 15, 2015

Member

These seem like proper Realm usage (ECMAScript code must be associated with a Realm[ record]). Code Realm and Realm seem interchangeable so I'd probably say "shared by all Realms" instead, though :-P

Member

bterlson commented Dec 15, 2015

These seem like proper Realm usage (ECMAScript code must be associated with a Realm[ record]). Code Realm and Realm seem interchangeable so I'd probably say "shared by all Realms" instead, though :-P

@bterlson bterlson added the question label Dec 15, 2015

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Dec 15, 2015

Member

I guess you could interpret things that way; seems like a stretch to me, but happy to close.

Member

domenic commented Dec 15, 2015

I guess you could interpret things that way; seems like a stretch to me, but happy to close.

@domenic domenic closed this Dec 15, 2015

@allenwb

This comment has been minimized.

Show comment
Hide comment
@allenwb

allenwb Dec 15, 2015

Member

"Realm" was the original name used for the concept but the original title of subclause 8.2 was "Code Realms" . In that context "code" was just a clarifying adjective. In practice we ended up using the terms "Realm", "realm", and "Code Realm" interchangeably to refer to the abstraction. Realm Record refers to a specific data structure.

I wsuggest that we just use "Realm" (with the cap) to refer to the abstraction. (hence "a Realm" would be an instance of the abstraction) and "Realm Record" when referring to the data structure.

Member

allenwb commented Dec 15, 2015

"Realm" was the original name used for the concept but the original title of subclause 8.2 was "Code Realms" . In that context "code" was just a clarifying adjective. In practice we ended up using the terms "Realm", "realm", and "Code Realm" interchangeably to refer to the abstraction. Realm Record refers to a specific data structure.

I wsuggest that we just use "Realm" (with the cap) to refer to the abstraction. (hence "a Realm" would be an instance of the abstraction) and "Realm Record" when referring to the data structure.

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Dec 16, 2015

Member

Bikeshed: we should use lowercase "realm" for the concept, so that it is not confused with the "Realm" record type, and so as to match other concepts like "execution context". I agree with removing "code" prefix and with trying to explicitly suffix "Record" where appropriate.

Member

domenic commented Dec 16, 2015

Bikeshed: we should use lowercase "realm" for the concept, so that it is not confused with the "Realm" record type, and so as to match other concepts like "execution context". I agree with removing "code" prefix and with trying to explicitly suffix "Record" where appropriate.

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Dec 16, 2015

Member

@domenic I'd take such a PR, I guess.

Member

bterlson commented Dec 16, 2015

@domenic I'd take such a PR, I guess.

domenic added a commit to domenic/ecma262 that referenced this issue Dec 30, 2015

Editorial: clarify realm vs. Realm Record
Fixes tc39#252. As discussed therein, a lowercase "realm" is an abstract concept, and a "Realm Record" is a specific type of record representing that realm throughout the algorithms and data structures of the spec.

This also removes uses of the term "code realm" in favor of simply "realm", and replaces "the running execution context's Realm" with "the current Realm Record" in a few places since the latter was specifically defined to mean the former.

domenic added a commit that referenced this issue Dec 30, 2015

Editorial: clarify realm vs. Realm Record
Fixes #252, Fixes #278. As discussed therein, a lowercase "realm" is an abstract concept, and a "Realm Record" is a specific type of record representing that realm throughout the algorithms and data structures of the spec.

This also removes uses of the term "code realm" in favor of simply "realm", and replaces "the running execution context's Realm" with "the current Realm Record" in a few places since the latter was specifically defined to mean the former.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment