On 1/7/08, Asheesh Laroia <[EMAIL PROTECTED]> wrote: > I'm preparing liblicense for a 0.5 release. There's been a lot of great > work in liblicense done by people who aren't me over the last few months, > and it's (way past) time for that work to see a general release. > > I'm inventorying it now to see what else should be done before 0.5. I > came up with an API switch I wanted to make, so I thought I'd ask the list > about it. (NY, this includes you - I haven't asked anyone other than my > head about this.) Be warned: No comments on this mean I'm going to get my > way! > > We have some ll_get_* functions, like ll_get_name, ll_get_jurisdiction, > and ll_get_version, and also a general ll_get_attribute() function. I > would like to remove the named ll_get_* functions and require users of the > license to use the ll_get_attribute(license_uri, LL_ATTRIBUTE_URI_PERMITS) > syntax.
I'm ++1 on this ;). I think I suggested something similar late summer and there was some push back. Of course, times change and we're breaking ABI compatibility anyway, so... maybe *I'll* get my way (albeit belatedly). I should probably point out that my opinion has no special standing here; I'm willing to be shouted down. I'm also in favor of shortening the constant names. I'd probably go so far as LL_REQUIRES, etc. > > Advantages: > > * Only one way to do it, and that way to do it extends in an obvious way > to the other > > * This is a C library, so people who complain about the syntax can't > really complain - they're already in C > * The addition of > * Making people aware of our constants makes it easier to show them that > they can often re-use these constants in other RDF-exposing libraries. > > Impact on speed: > > * None: If you use our (e.g.) LL_ATTRIBUTE_URI_PERMITS constant, then we > can do a pointer equailty check instead of a string check, which is > practically free, so there should be no speed loss from switching to this. > > Impact on library usability: > > * Hardly any: If your text editor has known-word completion, then it's > just as easy to expand arguments to ll_get_attribute as it is to expand > the function name ll_get_name. > > Disadvantages: > > * Only one: It makes the calls to ll_get_name(uri) etc. look longer. I'm > okay with shortening e.g. LL_ATTRIBUTE_URI_REQUIRES to > LL_ATTRIBUTE_REQUIRES or LL_ATTR_REQUIRES or even LL_REQUIRES. > > Your take: > > [This space intentionally left blank.] > > -- Asheesh. > > -- > All heiresses are beautiful. > -- John Dryden > _______________________________________________ > cc-devel mailing list > [email protected] > http://lists.ibiblio.org/mailman/listinfo/cc-devel > _______________________________________________ cc-devel mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/cc-devel
