Proposal: Reference implementations are not normative

Accepted

This page is dedicated to discussing this specific proposal

ContributeContributions

AntonErtlavatar of AntonErtl Reference implementations are not normativeProposal2021-04-15 08:17:45

Author:

M. Anton Ertl

Change Log:

2021-04-15 First version

Problem:

The Introduction E.1 of the reference implementations creates the impression that reference implementations are normative. IIRC that is not what we decided. Moreover, it would be a bad idea, because implementations by necessity overspecify the behaviour. E.g., the reference implementation of DEFER uses CREATE, but that does not mean that every implementation of DEFER has to use CREATE; the reference implementation of DEFER@ is to perform >BODY @, but that does not mean that a standard program can just use >BODY @ instead of DEFER@.

A related problem is that proposals contain reference implementations of several words that are intended to work together (e.g., the reference implementation of DEFER@ is designed to work with the reference implementation of DEFER), but they are split into individual words in Annex E. This should be explained in the introduction.

In the long run it is probably better to avoid this splitting, because it makes the reference implementations harder to understand; on forth-standard.org we should then probably show the full section (all the reference implementations of words that are designed together). The splitting has led to requests for clarification here (e.g., "Does the standard assume that DEFER was created with CREATE?"), so it obviously is not as clear as we would like.

Solution:

Change the wording of E.1 accordingly. This is just a wording change.

Proposal:

In E.1, replace

System implementors are free to implement any operation in a manner that suits their system, but it must exhibit the same behavior as the reference implementation given here.

with

These reference implementations are not normative. System implementors are free to implement an operation in any manner that conforms with the specification.

Some of these reference implementations are designed to work together, and rely on implementation details of the reference implementations of related words. They are best understood together.

ruvavatar of ruv

Agree. Just for reference: another proposal also removes the part concerning "it must exhibit the same behavior".

AntonErtlavatar of AntonErtl

Accepted with vote #22 12Y:0:0

Accepted
Reply New Version