Proposal: Better wording for "data field" term
This page is dedicated to discussing this specific proposal
ContributeContributions
ruv [214] Better wording for "data field" termProposal2021-09-14 08:55:49
Author
Ruv
Change Log
2021-09-14 Initial version
Assumption
A basic term definition should not inalienably refer to a Forth word or a further section of the standard. Such referring means that there is a lack of terms and the terminology should be better developed, or that just this definition is too poor.
Problem
We have the following problems with the definition for the "data field" term:
It inalienably refers to the
CREATE
word ( Forth-2012 contains only one such definition in the section 2.1. Definitions of terms).Formally, it conflicts with the term "data space". It says that a data field is a data space (i.e., it is a hyponym of). But the data space is a singleton, it unites all memory regions that may be accessed by a program. Hence a data field cannot be a hyponym of (or an instance of) the data space.
It connects a data field to a word defined via
CREATE
. But a sophisticatedSYNONYM
can keep these association for the newname (and the new xt) too. So, there is no need to restrict this association byCREATE
in the term definition.Formally, it conflicts with the term "word", since this term is used in a non normative meaning in this definition.
Solution
Update the definition for the "data field" term with the following changes:
- Remove the reference to
CREATE
. - Say that a data field is a data space region (as it actually is).
- Use the term "Forth definition" instead of the term "word" (optionally).
The insertion and deletions:
data field:
TheA data space region associated witha word defined via CREATEa Forth definition.
or another variant:
data field:
TheA data space region associated with a worddefined via CREATE.
Rationale
It doesn't matter whether each Forth definition is associated with a data field, or not (in some system, each Forth definition is associated with a data field, but some of them have zero size). In anyway, at the moment, the standard provides an API to associate a data field to and obtain it for a word that is created via CREATE
only. But this can be changed in the future, and now without touch the basic terms.
The expression "data space region" is obvious, so there is no need to define it. Also, it's already used in other places (e.g., see "region of data space" in the "variable" term).
Concerning "word" and "Forth definition". The latter one is more correct in this case. Although, this change is optional. The definition for the "word" term can be independently updated too, since it's used in the sense "named Forth definition" in many places (see also another comment).
Perhaps a better way is to formally associate a data field with an execution token, as it actually is (see >BODY
).
But, since the expression "name's data field" is used in some glossary entries, this approach requires an additional term:
- data field of a Forth definition: the data field associated with the execution token of the Forth definition.
This proposal can be updated accordingly, if any.
Proposal
Replace the definition for the "data field" term (in the section 2.1) by the following:
A data space region associated with a Forth definition.