[ ] conforms to ANS Forth. Gforth Win32Forth PFE (Guido Draheim) iForth (Marcel Hendrix) [ ] already implements the proposal in full since release [ ]. 4th 3.3d R2 (Hans Bezemer) iForth 3.0 [ ] implements the proposal in full in a development version. Gforth [ ] implements the proposal in full non-minimally in a development version. Gforth [ ] will implement the proposal in full in release [ ]. Gforth 0.7 4th 3.5b R2 (Hans Bezemer) [ ] will implement the proposal in full non-minimally in release [ ]. Gforth 0.7 [ ] will implement the proposal in full in some future release. [ ] will implement the proposal in full non-minimally in some future release. Win32Forth There are no plans to implement the proposal in full in [ ]. [ ] will never implement the proposal in full. PFE
[ ] I have used (parts of) this proposal in my programs. Anton Ertl [ ] I would use (parts of) this proposal in my programs if the systems I am interested in implemented it. David N. Williams Anton Ertl Alex McDonald [ ] I would use (parts of) this proposal in my programs if the systems I am interested in implemented it non-minimally. David N. Williams Anton Ertl [ ] I would use (parts of) this proposal in my programs if this proposal was in the Forth standard. David N. Williams Anton Ertl Alex McDonald [ ] I would not use (parts of) this proposal in my programs. Hans Bezemer (prefers [DEFINED])
ENVIRONMENT?
starts with "X:",
ENVIRONMENT?
returns false if the system does not
implement the extension indicated by the query string in full, or if
there is no such extension that has gone to a CfV.
For an extension from the list of CfVs, take the linked-to filename, delete the ".html", and prepend "X:" to construct a query string for the extension.
If the system implements the extension, ENVIRONMENT?
may
return true (without additional values) or false.
S" X:deferred" ENVIRONMENT? 0= [IF] ... \ reference implementation of the deferred words proposal [THEN]
Therefore, systems must not return true for extensions that have not yet gone to a CfV (the proposal for the extension could still change).
So, if a system happens to already support the extension, it will have to report false on queries for the extension at least from the time when the proposal goes to a CfV until the time that an update of the system with updated extension queries is released.
Moreover (and possibly more importantly), this feature means that systems whose implementors have never heard of (or ignore) RfDs and CfVs will work correctly for extension queries (as long as they don't support any queries starting with "X:" on their own), so a program written to cope with this specification will usually work correctly even on such systems.
Mitch Bradley and Guido Draheim would prefer a wordset-query-like behaviour, i.e., an additional flag if ENVIRONMENT? returns true. Richard Borrell would prefer a single flag (i.e., the proposed behaviour).
With the wordset-query-like behaviour, the typical use above would look like:
S" X:deferred" ENVIRONMENT? dup [IF] drop [THEN] 0= [IF] ... \ reference implementation of the deferred words proposal [THEN]
Here are some statistics about the use of ENVIRONMENT? in general and wordset queries in particular in ANS Forth programs:
Program Author ENVIRONMENT? wordset queries brainless David Kuehling yes no brew-0_03z9 Robert Epprecht yes no brew_..._38 Robert Epprecht yes floating-ext CD16v11 Brad Eckert no no anagrams Wil Baden no no pentomino Bruce Hoyt no no tscp Ian Osgood no no Gray4 Anton Ertl yes no garbage-coll Anton Ertl yes no
I believe that one of the reason that wordset queries are used so rarely is that they are so cumbersome to use (that's certainly one of the reasons that kept me from using it).
If you know of any name conflict of the "X:" prefix with an existing system and have a better suggestion for a prefix, let me know.
Bruce McFarling has suggested changing the prefix such that the query string can be used as a filename on DOS/Windows. However the prefix can be cut away easily, leading to a filename compatible with DOS/Windows (if the extension name is compatible), as the reference implementation demonstrates.
Guido Draheim suggested using a suffix, as it has advantages with input completion. A prefix can also be used to profit with input completion, and overall this issue does not seem very important. Prefixes are more traditional for tagging names in programs (while suffixes are used for file names).
One way to deal with this would be to use a consistent naming scheme for backwards-compatible extensions: deferred, deferred-2, deferred-3 etc. Then the system just needs to store the base name and the current revision number, and can check with a little code whether the queried-for extension is supported.
Keeping this naming scheme would be the responsibility of the person who maintains the list of CfVs. (It's not the responsibility of the system implementor and therefore not in the normative part of this proposal).
Doing this would require reserving some part of the ENVIRONMENT? name space for implementor-extension queries, with each query having an implementor part, and an extension name. A naming authority would assign implementor part names to implementors, and the implementor would assign extension part names. (Actually the implementor could use it for arbitrary queries, not just extension queries).
I am not convinced that there is enough demand for that. In any case, I would like to see it handled in a separate RfD/CfV.
Hans Bezemer and Albert van der Horst favour this approach.
That only tells whether a word exists in the system, but not how it behaves.
It would also require asking separately for each word. And for on-demand loading, it would require organizing each word separately. Lots of effort for the programmer and the system implementor.
The names of the extension queries (excluding the "X:" prefix) and the file names of the reference implementations should be lower case, so that the reference implementation of extension queries works on case-sensitive file systems (most Forth systems and the reference implementation match extension-query names case-insensitively, but making that standard is another RfD).
The names of the extension queries (excluding the "X:" prefix) should only contain printable ASCII characters that are allowed in all common file systems; it's probably best to just use alphanumeric characters and the "-".
Note that you can be both a system implementor and a programmer, so you can submit both kinds of ballots.
Since most ANS Forth systems already support this proposal in full in a minimal way (i.e., they return false on every extension query), this ballot also asks for non-minimal support.
Note that for this proposal non-implementation means that you reserve the right to answer "X:" queries with true even if you do not implement the queried-for extension. If the system answers the query with false, it supports the proposal in full in a minimal way.
[ ] conforms to ANS Forth. [ ] already implements the proposal in full since release [ ]. [ ] implements the proposal in full in a development version. [ ] implements the proposal in full non-minimally in a development version. [ ] will implement the proposal in full in release [ ]. [ ] will implement the proposal in full non-minimally in release [ ]. [ ] will implement the proposal in full in some future release. [ ] will implement the proposal in full non-minimally in some future release. There are no plans to implement the proposal in full in [ ]. [ ] will never implement the proposal in full.If you want to provide information on partial implementation, please do so informally, and I will aggregate this information in some way.
[ ] I have used (parts of) this proposal in my programs. [ ] I would use (parts of) this proposal in my programs if the systems I am interested in implemented it. [ ] I would use (parts of) this proposal in my programs if the systems I am interested in implemented it non-minimally. [ ] I would use (parts of) this proposal in my programs if this proposal was in the Forth standard. [ ] I would not use (parts of) this proposal in my programs.If you feel that there is closely related functionality missing from the proposal (especially if you have used that in your programs), make an informal comment, and I will collect these, too. Note that the best time to voice such issues is the RfD stage.