What license to use when sharing code? Gnu? MIT?

I would like to share some code for the community.

Does anybody have a particular license that they like to use for this stuff nowadays?

Thanks.

I usually just throw the MIT one on but it does depend on the project and what you are going for.

One I have heard rumours of recently is the idea of an “ethical software license” which is super interesting to consider. Nothing exists yet though as far as I know.

As I understand things, MIT allows others use and not share, GPL you need to share changes back, but use in a commercial product is more problematic.

As I understand things, MIT allows others use and not share, GPL you need to share changes back,

Your understanding is inaccurate.

With all open source licenses you need to make the code available to customers who you distribute the compiled form of code to, and they ask for it. Under none of the licenses is there any sort of “requirement to share” with anyone other than people you distribute the binary code to. (and if you don’t distribute the binary code you don’t have to share with anyone - again with the partial exception of GPL v3.)

Specifically there is no requirement under MIT or GPL (1 or 2) to give changes to anyone unless you ship them binary code and they ask for the source. There is no “send changes upstream” requirement to any license.

But yes, GPL is almost certainly useless from a Clarion point of view. It would make it impossible to use it in just about all Clarion programs. MIT is a lot better in this regard.

Jeff - in order to apply the right license you need to be very specific what your goals are;
a) do you want people to use it ?
b) do you want to prevent people using it in a certain way ?

For example - under MIT (or any other open source license) a 3rd party provider can take your code, alter it (or not) and package it (or not) and sell that and give you no money. That is expressly permitted by all open source licenses.

So you need to be a lot more specific with regard to your goals before you can choose a license.

Thanks Bruce. This is the kind of feedback I was looking for.