On Fri, Mar 21, 2014 at 3:39 PM, Nick Wellnhofer <[email protected]> wrote:
> I'd like to rename the "cnick" keyword in the Clownfish grammar to something
> more sensible. I don't even know what it stands for. "class nick"? "C nick"?
> I think that "nickname" would be better. We already use "nickname" in the
> .cfp files.

It stood for "C nickname".

To review, this feature allows us to create shorter C symbols.  Here's the
formula for composing the name of a fully qualified C macro for a method
specified in a Clownfish header:

    UPCASE(parcel_nickname) + '_' + class_nickname + '_' + method_name

Here's an example:

    parcel name:     org.apache.foo
    parcel nickname: foo
    class name:      search.BodaciousFrobnosticator
    class nickname:  BoFrob
    method name:     Do_Stuff

    = FOO_BoFrob_Do_Stuff

Without the use of nicknames, that symbol would have to be something like
`ORG_APACHE_FOO_BodaciousFrobnosticator_Do_Stuff`.

I came to regret using the term "cnick" for this purpose and I'm the one who
put "nickname" into the .cfp parcel JSON.  I'm +1 on purging "cnick" from the
Clownfish header language.

This is ultimately just another installment in the ongoing Clownfish
namespacing implementation saga.  It's hard to get this right.

Instead of replacing the keyword `cnick` with `nickname`, maybe it's time to
revisit the option of eliminating class nicknames altogether (while keeping
parcel nicknames).

Marvin Humphrey

Reply via email to