What is it?

PIL is a Platform Independent Language. It is a language that has two main uses:

  • As a target language for compilers (particularly domain-specific language compilers) to abstract from specific software platforms
  • As an implementation language for libraries/applications that need to be run on multiple software platforms. This works best for applications relatively independent on platform-specific libraries and frameworks.

Compiler use: Traditionally, DSL compilers generate code for a particular platform, e.g. Java, Python or C#. In order to generate software for multiple platforms, multiple compiler back-ends have to be maintained. What PIL allows you to do is generate code in one language (PIL), the PIL compiler will then translate the generated PIL code to any of its supported platform, simplifying the maintenance of multiple compiler back-ends.

Implementation language use: Since PIL has a convenient syntax, based on a subset of Java, PIL is easy to learn. Because code written in PIL can be compiled to a number of software platforms, PIL is also a great language to develop portable libraries and applications.

PIL can currently generate code for:

  • Java
  • Python
  • PHP 5

Back-ends under development:

  • Objective-C

Planned back-ends:

  • C#
  • Javascript
  • Smalltalk?

What does it look like?

    void main(Array<String> args) {
       println("Hello world!");
    }

Compile and run:

    $ pil-java hello.pil 
    [ pilc | info ] Now compiling: hello.pil
    [ pilc | info ] Done with hello.pil
    Hello world!
    $ pil-python hello.pil 
    [ pilc | info ] Now compiling: hello.pil
    [ pilc | info ] Done with hello.pil
    Hello world!

How do I contact you guys?

We're on IRC: irc.freenode.net #pil, Twitter and on Google Wave or e-mail Zef.