Thomas Wittek skribis 2007-06-14 17:18 (+0200): > So maybe directives like method, sub, attribute, class etc. might be a > better choice regarding semantics.
Yes, a better choice indeed. But I would still not be happy with it, because there would still be a lot of code duplication. method foo (:$bar = 5) { ... } I don't want to have to mention *again* that the thing is a "method", and that it is called "foo", that it has a "named argument" identified as "$bar", which defaults to 5. This is why I (long time ago) suggested "is documented". Like Mark, I do not really care about the actual syntax much: method foo is documented("Foos its argument interactively") ( :$bar = 5 is documented("Object to be fooed"), # I'm not sure about the precedence of "is". ) { ... } The backtick is rather cute and saves a lot of typing. It's like a comment (#), but ends up as *external* documentation. That's nice. > Semantics are very useful in documentation, why throw them away? Why not have both? With normal POD as suggested by Damian, you could still generate it from something else. A few macros could help ignore the inline documentation. -- korajn salutojn, juerd waalboer: perl hacker <[EMAIL PROTECTED]> <http://juerd.nl/sig> convolution: ict solutions and consultancy <[EMAIL PROTECTED]>