Consider:
/// Delete all values for a name. Does nothing if no values for the name
/// exist.
///
/// Fails with `header-error.immutable` if the `fields` are immutable.
delete: func(name: field-name) -> result<_, header-error>;
/// Delete all values for a name. Does nothing if no values for the name
/// exist.
///
/// Returns all values previously corresponding to the name, if any.
///
/// Fails with `header-error.immutable` if the `fields` are immutable.
get-and-delete: func(name: field-name) -> result<list<field-value>, header-error>;
When passed an invalid field name, delete could silently succeed (like get does), because by definition there is no field with that name; the operation will not set any field of the fields object. Or it could return an invalid-syntax error, because it has the Result. Wasmtime currently returns an error.
Similar concerns for get-and-delete; I guess it should be specified as propagating any error, as if get() then delete().