A current example that is a bit of a conundrum for me....
The transcendentals module has a lot of functions that have 4 methods. For example, take atan2:
atan2(<single-float>, <single-float>)
atan2(<double-float>, <single-float>)
atan2(<single-float>, <double-float>)
atan2(<double-float>, <double-float>)
How to document these?
Problem 1: Obviously we don't want to duplicate the entire section of documentation for all four methods, but there doesn't seem to be any way to reference a particular method specialization's documentation. It's common to do a minor conversion and then call the "primary" method.
Problem 2: Even if we could reference a particular method specialization, I suspect there would be many cases (and atan2 is an example) where it would be easier to read the documentation if it were all in a single section listing all method specializations. A natural way to do this would be to allow multiple :specializer: annotations under one .. method:: atan2. I'm also thinking perhaps we should allow :specializer: to be used (multiple times) under .. generic-function:: for cases like this where everything is sealed and all methods are known.
(If we do allow multiple :specializer: annotations, it will have an effect on how we solve the "reference a particular method" problem.)
I don't have it all figured out, obviously. Anyone have thoughts on this?
A current example that is a bit of a conundrum for me....
The
transcendentalsmodule has a lot of functions that have 4 methods. For example, takeatan2:How to document these?
Problem 1: Obviously we don't want to duplicate the entire section of documentation for all four methods, but there doesn't seem to be any way to reference a particular method specialization's documentation. It's common to do a minor conversion and then call the "primary" method.
Problem 2: Even if we could reference a particular method specialization, I suspect there would be many cases (and
atan2is an example) where it would be easier to read the documentation if it were all in a single section listing all method specializations. A natural way to do this would be to allow multiple:specializer:annotations under one.. method:: atan2. I'm also thinking perhaps we should allow:specializer:to be used (multiple times) under.. generic-function::for cases like this where everything is sealed and all methods are known.(If we do allow multiple
:specializer:annotations, it will have an effect on how we solve the "reference a particular method" problem.)I don't have it all figured out, obviously. Anyone have thoughts on this?