3

I've been reading the differences between these two licenses for a few hours now and it is still quite not clear to me how this duality works. As far as I understood, the MIT license basically gives you the freedom to decide if you wish to open-source the author's code or not as long as it carries the MIT license notice (i.e. include the copyright). On the other hand, the GPL license gives you more restriction. If you distribute a GPL licensed code (i.e. as in a website) you must make it open-sourced including your own code (i.e. no code on your website can be encrypted).

Please correct me if my understanding is wrong and I would be thankful if someone could clarify to me how this duality works. If MIT allows us to distribute it without the requirement of open-sourcing it how can it be dual with GPL?

5

If I decide to sell you a car, I can offer to do so for (say) a thousand pounds, or if I choose I might say to you "You can have my car for either a thousand pounds or your motorcycle in exchange". If you decide you want my car it's up to you to decide which condition to honour: the money or the motorcycle.

That is the essence of dual licensing. I offer to give you a copy of some code, plus the rights to do certain things with it, and in exchange I require that you agree to honour either this set of conditions here (the MIT licence), or this other set of conditions here (the GNU GPL). If you want the code and the rights, you must decide which set of conditions you will accept. In theory you should probably decide then and there, though in practice it makes no difference until you want to do something, probably redistribution, where the two set of requirements differ.

If you decide to accept the code under MIT, then the added restrictions of the GPL no longer apply to your copy; if you decide to accept it under GPL, then the absence of those restrictions from the MIT licence no longer matters with respect to your copy. That's why any contradiction between the two doesn't matter in this case.

Edit: you have pointed us to the code in question, for which many thanks. Reading eg this file, the author writes "Dual licensed under the MIT or GPL Version 2 licenses". So yes, you can choose which one of those licences you receive it under, and once you have done so, you need not worry about the requirements of the one you didn't choose.

  • Thanks for your answer @MadHatter! They did use both, here's the link to their GitHub: github.com/pioul/jQuery.Maxlength ... However, I'm still confused about my last point "If MIT allows us to distribute it without the requirement of open-sourcing it how can it be dual with GPL?". I would be using someone else's code on a website. This would mean that I am distributing it, correct? Therefore, are the two licenses still valid? As in, Can I still decide which one I desire to honour? – Fergo Sep 18 at 17:26
  • @Fergo see edit above. – MadHatter supports Monica Sep 18 at 20:48
  • Thank you once again @MadHatter. One last thing... when including the copyright should I mention that it is dual-licensed or I just mention the license of my preference? – Fergo Sep 19 at 8:42
  • @Fergo my feeling is it will all be simpler if you choose one, rather than trying to preserve the dual-licensed status. But that's just my feeling, as IANAL/IANYL. Don't forget to accept this answer if you're now happy with it; thanks. – MadHatter supports Monica Sep 19 at 9:23
  • 1
    It's actually considered good practice to comply with both licenses if it is reasonably practicable to do so, because this makes it easier for upstream to accept your patches. But obviously there is no legal obligation to do so, and depending on your use case, it may be an unrealistic goal. – Kevin Sep 22 at 22:27
-1

As @MadHater showed it is possible to publih under both of them and let user choose, which one use. (Selling car for 1K$ or for motorcycle - your chose)

As Author you can publish your code under any number of (possibly incompatible) licences, but at the moment of transaction the user have to choose, which one to pick and be bounded to.

I can go to local market, put a table there marked "Gilhad superior util, now in many versions avaiable" and place few stacks of CDs there, marked like "1$ GL-2", "2$ GL-2 (with free brownie)", "0$ GL-2 (if you smile on me)" "1$ GPL3" "1$ GL3 or later", "$100 proprietary with super duper restrictions a funny necktie included", "0$ MIT" .... and containing the same code with just different Licence.

Customers come and take, what they want and if they use it, they are bouded by respective licences.

Some may even came, take one with GPL-2 (and give me a smile to have it free) and one with MIT, than compare it at home to see, thay are the same, except licence, duplicate that and put they table "Fergo's copies of Gilhad superior util, now in many versions avaiable - we have nice T-shirts too" with "2$ GPL-2" and "0$ MIT" stacks of CDs with respective licencies there (as long, as they stick to their promises and licencies :)

And also can fix all my typos and add some their work and make table with "Fergo's copies of Gilhad superior util with fixed all typos, now in many versions avaiable" and put again "2$ GPL-2" and "0$ MIT" stacks of CDs with respective licencies there.

Or you can make nice website and put it there to download, taking my utils from old middleages to hot future :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.