Re: Question about pseudocode and <CODE BEGINS>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Brian, others,

(... apologies for potentially pulling this thread direction you didn't
have in mind when initiating this conversation)

On Tue, Dec 14, 2021 at 10:34:29AM +1300, Brian E Carpenter wrote:
> Do people think it's a good or bad idea to label pseudocode
> in an RFC with <CODE BEGINS>?

I think pseudo-code in RFCs is a bad idea... regardless of the label! :-)

Pseudo-code literally is just fantasy speak; probably closer related to
dada poetry (it being a chaotic expression rather than something that is
productive!). Pseudo-code - by both definition and tradition - cannot be
interpreted in any meaningful way.

There is no compiler available for 'pseudo-code', so how can humans
ever stand a chance to make sense of what the authors intended? 

I'd like to point out two examples:

Example #1: Dissemination of Flow Specification Rules (now RFC 8955)
-----------
One of the challenges with implementing Flowspec rule ordering was that
the original specification included pseudo-code, which was one of the
aspects that multiple implementers ended up mis-implementing to some
degree, because there was ambiguity: https://datatracker.ietf.org/doc/html/rfc5575#section-5.1

When the -bis effort started, it was pointed out that the pseudo-code
was highly problematic and one of the sources of confusion, which led to
the -bis document being needed in the first place! The authors agreed
and graciously contributed their time to improve the document by
replacing pseudo-code with python code.

  Fantasy code: https://datatracker.ietf.org/doc/html/draft-ietf-idr-rfc5575bis-04#section-5.1
   Actual code: https://datatracker.ietf.org/doc/html/draft-ietf-idr-rfc5575bis-05#section-5.1

Anyone will agree that the actual code serves a purpose, whereas the
fantasy pseudo-code introduces more room for implementation error.

Example #2: RPKI Origin Validation (RFC 6811)
-----------
This snippet increased confusion, rather than help prevent it:
https://datatracker.ietf.org/doc/html/rfc6811#section-2.1

---

All in all - I believe pseudo-code should be eradicated from the IETF's
body of work, rather than be wrapped or labeled. Use of pseudo-code
should be discouraged at all levels of our organization.

Kind regards,

Job




[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Mhonarc]     [Fedora Users]

  Powered by Linux