Thursday, May 22, 2008

A thought... Annotated licenses....

When mixing code libraries together, wouldn't it be neat to be able to enumerate all the licenses that applied to the code base.

How about an @License annotation?

@License(name="MyNeatLibrary",type="BSD",author="Blah Blah Inc")
@License(name="IrregularExpression Library",type="CCattrib",attrib="Fred Flintstone",attribemail="fred@example.com",attriburl="http://example.com")

At run time, the "About" dialog then scans the code base for the annotations, which would be set to runtime persist, and then display about information based on what is actually used.

It wouldn't attempt to enforce the licenses, but would allow for automatic visibility of licenses.

Of course, this would have to be done in some coordinated way to standardise the types and attributes, but it has some potential... just as long as we don't end up with per-method licenses.

[ This thought caused by following Matt Gemmell on Twitter ]

No comments: