[Coldstuff] Method meta-data

Matthijs van Duin matthijs@cds.nl
Mon, 7 Jan 2002 16:17:57 +0100


updated version again at the same page


>Except #0 is $sys, not $root.

WHOOPS, mind blurp


>Why is the method help returning, not throwing ~keynf?  Errors 
>should always be thrown.

1. no error has occurred, I always allow clear
2. the reason is in the comment right above it

When you do method_help on one that has no help, it returns a false 
value (~keynf, because of the critical expression). When you call 
set_method_help it'll return the value a subsequent call to 
method_help would return, which is ~keynf.


>I'd still rather see the underlying variable called method_metadata 
>rather than just method_meta.  There are other meanings for meta 
>that could confuse the issue and the longer form is much less 
>ambiguous.

To be honest, I think it's pointlessly verbose. If you think it's 
really a major problem I'll can change it, but I don't think it makes 
the whole thing more clear. I think it causes expressions that use 
the var to become annoyingly long.
There will always be things that remain ambiguous.. even if it would 
be called method_meta_data. Like what it is used for? what kind of 
data does it contain? etc..  Most variables are meaningless if you 
don't have access to the code that uses them. When you look at the 
methods that use method_meta, its meaning and purpose becomes fully 
clear.

In short, I like method_meta more than method_meta_data, but if that 
would prevent the code to be added to ColdCore I'll change it 
ofcourse.


>There are some other uses of this as well by the way that might be 
>good to supply default implementations for

of later concern, this is just to provide the framework and two examples.

note that date/user modified is already added as comment, and that's 
a better idea anyway, since the method meta-data is user-editable. 
copyright however could certainly be added later easily


  - xmath


Matthijs van Duin     (NOTE: PGP key has changed!)
- PGP Key: 0x2D6F0BA7   <finger://pgp@hmvd.cds.nl> -
- FP: 205D F7BA FFAD 9070 AB9E  C5A8 BDB0 CA1B 2D6F 0BA7 -