FAQ (Frequently Asked Questions)
Which platform does PPL run on?
What do I need to develop applications with PPL?
Where can I find more information?
What is PPL?
PPL is an acronym for Practical Programming Language. PPL is a modern, high-level, portable, object-oriented programming language with functional elements and the following properties:
-
designed from the ground up for people who care about writing reliable and maintainable code
Many classes of bugs are abolished by design, and remaining bugs must be found as quickly as possible in the development process.
-
practical and simple, but not simplistic
"Everything should be as simple as possible, but not simpler"- Albert Einstein -
fully integrated with Java
You can use Java libraries (.jar or .mod files) and Java source code (.java files) in a PPL application. PPL and Java code can also be mixed in a single source code file.
How does it work?
The fundamental idea is to consistently apply the Fail Fast! principle at every stage:-
The best option is to simply abolish whole classes of bugs by design.
Examples: Silently ignored arithmetic overflow errors, implicit type conversions and type coercions, so-called truthy and falsy values, shadowed variables, and other oddities can lead to nasty bugs that might stay undetected until an exceptional situation arises at run-time and produces a (possibly catastrophic) failure in production.
An infamous example is the explosion of the Ariane 5 rocket due to cramming a 64-bit number into a 16-bit space.
Such potentially dangerous operations are therefore banned in PPL.
-
Many language design choices affect the risks for defects in software applications. Therefore, all design choices in PPL have been dictated by the primary goal to reduce the risk for software defects.
Examples:
It is nowadays an undisputed fact that mutable data increase complexity and are an ubiquitous source of bugs that are often difficult to identify and reproduce, especially in parallel processing environments. In PPL, all data are therefore immutable by default.
There are no empty strings, and no empty immutable lists in PPL. This might seem strange at first, but it makes sense in the context of aiming for less bugs.
-
The next best option is to detect bugs automatically. This can be done by the compiler, by static code analyzers, or by automatically created test cases.
Example: Compile-time null-safety is built into PPL. Hence, the most common bug popping up in many popular programming languages, namely the infamous null pointer error, cannot occur in PPL code.
-
A good number of bugs can be found with test-driven-development.
Unit-testing is therefore a standard feature of PPL that works out-of-the-box and is very easy to use.
-
If a bug escapes all previously mentioned measures, then it should reveal itself as early as possible at run-time.
Example: Design by Contract (also called Contract Programming) is fully supported in PPL, because it is a very effective technique to detect bugs quickly at run-time. For instance, calling an API with invalid input, or creating an object in an invalid state immediately results in runtime errors composed of a clear error description, the full stack trace, and (optionally) the internal state of input arguments and script constants/variables at the time of the error.
There are many more Fail fast! features built into PPL. They are explained in the PPL documentation and illustrated with source code examples.
The aim is to fully adhere to the great and noble ...
Poka Yoke (ポカヨケ)
... principle at every stage.
According to Wikipedia:
Poka Yoke is a Japanese term that means "inadvertent error prevention". ... [It] helps an equipment operator avoid mistakes. Its purpose is to eliminate product defects by preventing, correcting, or drawing attention to human errors as they occur.
What's unique about PPL?
To achieve its main goal (error prevention), PPL incorporates a unique combination of proven and innovative Fail fast! concepts not found or only partially found in other programming languages.
From the outset PPL was designed with these concepts in mind. They are part of the language and therefore lead to the following benefits:
- all concepts work and evolve seamlessly together
- they are easy to use
- there are no dependencies on third-party extensions and no version conflicts or upgrade incompatibilities
- they are part of the API, and consistently applied in PPL's libraries
Besides features for more reliability, PPL also provides modern and helpful programming techniques such as string interpolation, lambdas/closures, sequential and parallel streams (with filter, map and reduce functionality), and union (sum) types.
There are also special instructions and operators to make run-time error handling (e.g. file not found) as painless and non-obtrusive as possible.
Due to it's full integration with Java, all existing Java code can easily be used in a PPL application.
A language designed to find bugs quickly also increases productivity and makes programming more enjoyable, because less time is spent to find and repair bugs.
What is PPL not?
If you need to write low level code that runs as fast as possible and consumes a minimum of memory, then PPL is not a good choice. In PPL, trade-offs are always made in favor of reliability and safety, not efficiency.
For example, arithmetic operations do not produce silently ignored arithmetic overflow errors. But this requires the results to be checked against an overflow (depending on the operation). This takes times. Hence, a number crunching application written in PPL would obviously be slower than the same application written in C.
However, critical parts of a PPL application can use Java Native Interface (JNI) to call routines written in other languages, such as C.
Which platform does PPL run on?
The PPL compiler generates Java binaries (.jar or .class files). Hence, applications written in PPL run on any platform that supports a Java Virtual Machine (JVM), such as Linux, Mac OS X, Unix, Windows, etc.
Other target code could be produced in the future, because the code generation part of the compiler has been designed with this flexibility in mind.
How much does PPL cost?
PPL is free of charge for everybody.
Which license is used?
PPL's core library is licensed under the terms of the GNU General Public License, version 2.
The compiler implementation (included in the distribution) is currently not licensed under the GPL2. For more information please contact the author.
The license model might change in the future.
How is PPL developed?
Hi. My name is Christian Neumanns, born in Luxembourg, Europe. I am a curious programmer, a zealous simplifier, and the creator of the Practical Programming Language (PPL) and Practical Markup Language (PML).
My intention is to create an open-source-community project.
Everybody is very welcome to participate.
How is PPL funded?
PPL is currently not funded and there are no revenues (neither in form of money nor other values).
I develop PPL in my free time.
How mature is PPL?
PPL (i.e. the compiler, the development environment and the libraries) is itself entirely written in PPL.
PPL is also used in the development of an ERP application.
Hence the language has been tested and debugged to a certain extent.
However, PPL is a work in progress and should not yet be used to develop mission-critical enterprise applications.
The syntax and semantics may slightly change in the future, and backward compatibility is currently not guaranteed.
The standard libraries available in PPL are incomplete and not yet tested thoroughly. However, you can always use existing Java packages if some functionality is missing or not mature enough in PPL.
The documentation is not finished yet.
Moreover, there is currently no support for an Integrated Development Environment (IDE). IDE support is planned to be added in the future. Some basic support for the IntelliJ IDEA is under construction.
Developers are encouraged to send feed-back to contact {at} ppl-lang {dot} dev. Bug reports and requests for improving or adding Fail fast! features are always handled with highest priority.
What can I do with PPL?
You can develop any kind of application that runs on a Java Virtual Machine.
You can develop on Unix (Linux), Mac OS X and Windows platforms and then deploy to anyone of these platforms (e.g. develop on Windows and deploy to Linux, or vice-versa).
You can also easily combine PPL and Java code in your application. For example, you can:
- embed Java source code in PPL source code
- add pure Java source code files to a PPL project
- call Java code from PPL code, call PPL code from Java code, and exchange data between Java and PPL
- use any existing .jar or .class files (Java libraries and frameworks)
- integrate any software written in any other language that produces Java binaries, such as software written in Groovy, Jyton, JRuby, Scala, etc.
The advantage of using PPL is that you can benefit from PPL's specific support for more reliable code. At the same time, you can rely on the very popular, robust and successful Java technology, and you can easily embed existing Java libraries and frameworks in your PPL projects.
What do I need to develop applications with PPL?
You just need:
- a computer with an operating system that supports a Java SDK (for example Linux, Mac OS X, Windows)
- a text editor
You can then download PPL (a single compressed file), read the documentation, and start developing.
You can deploy your application to any computer or device that supports a Java Virtual Machine (JVM).
Where can I find more information?
Documentation is available at www.ppl-lang.dev
If you need more information then please write a message to 'contact {at} ppl-lang {dot} dev'.