[Mono-dev] Off topic: Reflection and Licensing question

Michael B. Trausch mbt at zest.trausch.us
Wed Apr 29 15:50:29 EDT 2009


On Wed, 29 Apr 2009 15:52:03 -0300
Ernesto <equistango at gmail.com> wrote:

> I've been googling for information about reflection and licenses like 
> the GPL, that "prohibit" linking from code with a different license
> and found nothing.
> 
> Is reflection considered linking? Or is it considered a form of
> abstract communication such as permitted by the GPL? What would be
> the legality of using a GPLd module through reflection in a closed
> source or BSD application?

The idea of reflection in a system makes difficult to determine where
the fine line is.  That said, my _personal_ belief is that using
reflection does not constitute linking.  Here is my justification for
that belief:

  * Reflection can take place on an arbitrary file.  Linking (even
    dynamic linking) isn't arbitrary, it's determined at compile time
    with some run-time assistance.
  * If you reflect into an assembly which is otherwise unknown to your
    application and isn't part of the application's dependencies, you
    can call into it, and you can get results from it, and you can
    instantiate objects from it, but you don't have to, and you can
    replace that file with any other file that implements a compatible
    interface.  You can do some of that (but not all of it) with a
    library assembly that is required by your application at run-time;
    particularly if the assembly that you're "linking" to is strong
    named, and you're linking to the strong name.
  * Reflection is akin to Linux's dlopen()/dlsym()/dlclose() or Win32's
    LoadLibrary()/GetProcAddress() in that it enables you to use
    any arbitrary library and create an extension or plugin interface
    to your application should you decide to go that route.  If your
    user has a GPL module that they'd like to use, and your application
    is proprietary, the user's use of their GPL'd plugin to your
    proprietary application does not automatically mean that the GPL
    applies to your code, too.

All this said, IANAL.  But, that's my belief and justification for it.
Also, I'd recommend that if you have a need to interface with MySQL in
a proprietary application that you not use the MySQL provided
drivers/interfaces and instead create your own module/library/interface
that speaks the MySQL wire-line protocol (or enough of it to meet your
needs) and maybe provide it under the terms of the BSD license or
something more amenable to client-side programming requirements for
proprietary applications.  That's just my 2¢, though.

	--- Mike

-- 
Don't fix bugs later; fix them now.
                            --- Steve Maguire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090429/1ff3480a/attachment.bin 


More information about the Mono-devel-list mailing list