Skip to Content.
Sympa Menu

cc-devel - Re: [cc-devel] API changes for liblicense: drop ll_get_name() and friends

cc-devel AT lists.ibiblio.org

Subject: Developer discussion for Creative Commons technology and tools

List archive

Chronological Thread  
  • From: Jon Phillips <jon AT rejon.org>
  • To: Asheesh Laroia <asheesh AT creativecommons.org>
  • Cc: cc-devel AT lists.ibiblio.org
  • Subject: Re: [cc-devel] API changes for liblicense: drop ll_get_name() and friends
  • Date: Tue, 08 Jan 2008 13:53:30 +0800


On Mon, 2008-01-07 at 19:14 -0800, Asheesh Laroia 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.

Great!

> 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.

Cool, this is what pmiller proposed on the list before as well...sounds
good...

> 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.

I think more informative is better.

Rock.

Jon

> Your take:
>
> [This space intentionally left blank.]
>
> -- Asheesh.
>
--
Jon Phillips

San Francisco, CA
USA PH 510.499.0894
jon AT rejon.org
http://www.rejon.org

MSN, AIM, Yahoo Chat: kidproto
Jabber Chat: rejon AT gristle.org
IRC: rejon AT irc.freenode.net

Please note: the contents of this email are not intended to be
legal advice nor should they be relied upon as or represented to be
legal advice. Jon Phillips does not represent any organization through
this email address.





Archive powered by MHonArc 2.6.24.

Top of Page