3 ms·
Making the thing that describes the bounds of an arbitrary length thing itself arbitrary length sound like an unnecessarily risky complication to me. Especiall
by weinzierl 3mo ago
Making the thing that describes the bounds of an arbitrary length thing itself arbitrary length sound like an unnecessarily risky complication to me.
Especially since it only grows with the log of the thing it bounds. So, we could easily have s fixed length length field that covers all ever possible length values.
- kazinator 3mo agoOr you could just have the standard have a "Conformance Limits" section where it says something similar to "Every implementation shall support a length field value of at least 9223372036854775807, with an unlimited number of leading zeros". In other words, values beyond that are not forbidden by the spec, but are outside of the conformance requirements. It is a quality of implementation issue whether a given implementation handles more than required.
- weinzierl 3mo agoThat the spec is lenient and the conformance test strict makes ot only worse.
- repiret 3mo agoIt's mathematically impossible to describe an arbitrary length in a fixed length.
- weinzierl 3mo agoLuckily in math we do not have to allocate memory and worry about buffer overflows.