Skip to content

Why does INCLUDED record loaded files? #181

Answered by ruv
SirWumpus asked this question in Q&A
Discussion options

You must be logged in to vote

REQUIRED implies that the onus of recording loaded files is on INCLUDED, when there is no such mention in section 11.6.1.1718 INCLUDED.

Yes. The idea was probably that "11.6.2.2144.50 REQUIRED" updates 11.6.1.1718 and the behavior of INCLUDED. In other cases this idea is expressed more explicitly.

Should it not be REQUIRED responsibility to record included files? A clear separation of tasks.

I agree. I have never used Forth-2012 REQUIRED and REQUIRE. Far before Forth-2012 I used REQUIRED-WORD ( sd.filename sd.wordname -- ) that loads (includes) the file if the given word is unavailable in the search order. Actually, it was named REQUIRED and REQUIRE ( "wordname" "filename" -- ) , beca…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SirWumpus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
clarification Rationale or explanation to the Forth standard
2 participants