gf_data function versus structure



2013/3/13 Robert Dodier <robert.dodier at gmail.com>:
> Volker,
>
> Thanks for all your work on GF functions.
> I noticed that gf_data is both the name of a function and
> a structure which is returned by that function.
> I.e. function gf_data returns a gf_data structure.
> That's a little problematic since that makes gf_data structures
> unreadable, in the sense that the output of grind cannot be parsed,
> as it causes an error about a wrong number of arguments for
> $GF_DATA.

I see the problem. Thanks for pointing to that.

> I'm pretty sure it's necessary to distinguish the name of the
> structure from the name of the function. My recommendation
> is to rename the function to gf_get_data (and rename gf_set
> to gf_set_data to show that it is related). Another approach is
> to make the structure name a noun, so that one would write
> 'gf_data(...) to make a structure. I'm less enthusiastic about
> that. What do you think?

gf_get_data and gf_set_data are OK by me.

I would be happy if all the function names will finally be found
before the next release. There are two more functions which are
related to gf_set_data. Perhaps you have suitable names available.

1. gf_minimal_set(characteristic, reduction poly) just sets the
minimal number of global variables to allow basic arithmetics. E.g.
gf_minimal_set doesn't perform a time consuming computation of a
primitive element.

2. gf_set_again(data) sets all globals according to the previously
computed data.

Are there better names for these two functions?

Best
Volker


> best
>
> Robert Dodier