# on Saturday 03 March 2007 12:08 am:
# Smylers said
>There are other ways of achieving this, possibly even going further
> and specifying which extension fields being used. For example there
> could be a field 'extension-fields' which lists them
# Meanwhile, in another part of the thread
# on Friday 02 March 2007 03:35 pm:
# Eric Wilhelm said
>>What about having an "extensions" field as part of the spec
>> declaration, where anything listed in it is allowed? This would mean
>> that tools which are extending the spec would not have to change the
>> attribute name if it gets adopted as-is, and would still allow strict
>> validation if you're into that sort of thing.
>> ...
>>Wait, let's make 'extensions' a hash, thus allowing you to say which
>>(possibly competing) version of the thbbt extension you're using.
---
thbbt: foo
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
extensions:
thbbt: http://welikethbbt.com/a_new_meta_attribute.html
> (with their types?).
Types? Not 'integer' and such, right?
Well at least we're in agreement (I think) about declaring "field 'foo'
is an extension" in the yml.
I think it's worth noting that the X-foo stuff from mail headers
(however good or bad it may be) is tailored to line-by-line processing.
META.yml is a random-access data structure, so we can definitely do
without the must-not-lookahead considerations.
With a declared extension, the tool can check the extensions field under
meta-spec, drop the entries for any extensions it doesn't support, and
complain (or not) about any remaining fields that aren't recognized
according to {meta-spec}{version}.
I particularly like the part about: once tools support an extension,
they don't require changes (e.g. from "X-foo" to "foo") if the field
becomes official. That makes it much easier for multiple tools to
remain in-sync across the transition, even if they aren't being
particularly spec-version-aware.
The only stricture (maybe) would be that a tool should not emit the
extensions entry for a field if it is claiming to be a spec-version
which has adopted that extension field as core.
--Eric
--
"It works better if you plug it in!"
--Sattinger's Law
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------