I'm about to publish the source of the compiler of my new language and the standard library, both written in this language.

I need to choose the license. GPL is too restrictive (even with the linking exception) and complicated. MIT seems to not offer patent protection. So I'm now considering either Apache or MPL.

To me MPL looks like an ideal option: it protects the project and its contributors, and it doesn't result in any inconveniences for corporations.

The only thing they have to do is share modifications to existing MPL licensed files, but it's easier for them to contribute rather than maintain a separate fork anyway.

But several people are confident that if I don't go for a copyfree license, lots of developers and companies will be scared off from contributing.

I wasn't able to get any specific reasons from them other than ideological ones and "the license is too complicated".

What are the drawbacks I'm not seeing?


Forgot to mention that the compiler can only produces binaries. It emits either x64 machine code or C code which is later compiled by Clang or GCC. It can't be run as an interpreter.

edit 2 I went for MIT in the end.

  • A lot depends on how your compiler can be used. For example, can your compiler only create stand-alone executables, or can it also be used in a larger application to compile scripts/plugins on the fly? Mar 17, 2019 at 15:04
  • Sorry, that's very relevant of course. Forgot to mention that the compiler produces binaries only by emitting either machine code directly or C code. It can't be run on the fly.
    – Alex
    Mar 17, 2019 at 15:19
  • GCC has to deal with this dilemma, and their solution is to basically have a special exception for the standard library.
    – Kevin
    Jul 6, 2019 at 21:15

1 Answer 1


For an application that is not designed to be used as a plugin and that does not support plugins itself, like your compiler, the only considerations for the copyright license are

  • the licenses of any third party libraries used by the application (do those libraries limit your choice of licenses)
  • the ideals that the authors want to live by with regards to open source (how supportive are you of open source, do you want maximum freedom for your end-users (copyleft) or developers using your code (permissive licenses), etc.)

When plugins are involved, you need to take into account the license of the system you are plugging into and/or how your license will be received by potential authors of plugins for your application.

For the standard library of your language, you need to consider that every application written in your language will link to that library one way or the other.

Companies are very sensitive to licenses that might force them to publish source code that is related to their core business. For this reason, corporate lawyers try to stay as far away from strong copyleft licenses, like the GPL, as possible.

  • 1
    Thanks. MPL allows static linking, so I think it's a good choice.
    – Alex
    Mar 17, 2019 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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