On Wed, Dec 10, 2014 at 9:04 AM, Nick Wellnhofer <[email protected]> wrote:
> All of this is now implemented.
\o/
\o/
\o/
> The only remaining issue is how to treat the global error variable.
> Currently, we replace the text "Err_error" with "Clownfish->error" in the
> Perl POD. But Err_error isn't a valid symbol (maybe it was at some point?),
> so we should use something else for the C documentation. It should work to
> use a pseudo-link like `[](cfish:@error)` with the following replacements:
>
> C: "[the global error](cfish:cfish.Err.get_error)"
> Perl: "Clownfish->error"
>
> (Typical usage in the documentation is something like "...sets Err_error
> when...").
IIRC `Err_error` was the original location but its functionality was moved
into a Perl scalar so that the variable would be thread-local under Perl
ithreads.
I think we should avoid symbolic replacements which include an article like
"the" -- too inflexible, too much mental gymnastics to use in context.
Instead, I suggest we should map @error to a proper name, but keep it hidden
-- i.e. "current_error" in the C bindings would be renamed to "Err_error" but
would retain its `static` qualifier.
I agree with using the pseudo-symbol `[](cfish:@error)`, because we will be
special-casing the translation. Prepending `@` seems like a decent choice.
Marvin Humphrey