Skip to content
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

Most recent definition #19

Open
ruv opened this issue Jan 20, 2025 · 0 comments
Open

Most recent definition #19

ruv opened this issue Jan 20, 2025 · 0 comments
Labels
clarification Something needs to be clearer or more accurate inconsistency Something is inconsistent with something else

Comments

@ruv
Copy link
Collaborator

ruv commented Jan 20, 2025

The notion of "most recent definition" has the following problems:

  1. It is used in the standard in two variants: "the most recent definition" and "the most recently compiled definition" (see 16.3.3). Perhaps they both mean the same thing.
  2. There is no formal definition for this notion. Without a formal definition it is confusing (see also a discussion).

Probably, it makes sense to distinguish between the notions of "current definition" and "most recent definition" so that one Forth definition cannot be both of them in the same time (note that the former is defined in 2.1 Definitions of terms, but not the later).

Then, in some cases wording should be updated accordingly. For example, in 6.1.1250 DOES>.

Note that the following program should be ambiguous even if change-the-latest unambiguously changes the execution semantics of foo:

: change-the-latest ( -- ) does> @ ;
create foo 123 ,
:noname  foo [ change-the-latest ] foo ; execute
@ruv ruv added clarification Something needs to be clearer or more accurate inconsistency Something is inconsistent with something else labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Something needs to be clearer or more accurate inconsistency Something is inconsistent with something else
Projects
None yet
Development

No branches or pull requests

1 participant