Sujet : Re: single-xt approach in the standard
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 21. Sep 2024, 03:51:14
Autres entêtes
Organisation : Ausics - https://newsgroups.ausics.net
Message-ID : <66ee34a2$1@news.ausics.net>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 17/09/2024 11:04 pm, Ruvim wrote:
There is a point of view (which I don't share) that it is impossible to implement the standard word `s"` (from the File word set) in a standard *program*. I.e., that the following definition for `s"` is not standard compliant:
: s" ( "ccc" -- sd | )
[char] " parse
state @ if postpone sliteral exit then
dup >r allocate throw tuck r@ move r>
; immediate
This effectively means that the classic single-xt approach is impossible for a standard system.
Forth-94 section A.1.2 indicates the X3J14 Technical Committee were guided by
several considerations including:
"Cost of compliance
This goal includes such issues as common practice, how much existing code
would be broken by the proposed change, and the amount of effort required to
bring existing applications and systems into conformity with the Standard.
Utility
Be judged to have sufficiently essential functionality and frequency of use
to be deemed suitable for inclusion."
As 200x has since sought fit to require:
- a separate fp stack
- quote-delimited character interpretation ('A')
- S" support two interpretive buffers
nobody that has complied should be worried about excluding systems that use a
state-smart S" .