MOSTflexiPL provides a reasonable set of predefined operators covering arithmetic, logic, and basic control structures, so that it is readily usable as a general purpose programming language. However, by exploiting its possibilities of syntactic extensibility, one can easily define additional language constructs in order to simplify, e. g., the implementation of a particular program.

More general language extensions, which might be useful for different applications, can be implemented as a library – just like function or class libraries in other languages –, which can be reused in other projects or shipped to other users.

Another useful application is the definition of domain-specific languages (DSLs) as extensions or customizations of MOSTflexiPL, i. e., employing MOSTflexiPL as a host language for other languages. Since the syntactic flexibility is virtually unlimited, this approach of embedding a DSL into MOSTflexiPL has almost no drawbacks compared to the implementation of a tailored compiler, interpreter or similar from scratch, which usually requires considerable more effort.

Finally, MOSTflexiPL might be used as a platform to experiment with new language constructs (e. g., to better support parallel or natural language programming). Since new language constructs can be defined quickly and easily, one can fully concentrate on their design instead of their implementation (e. g., by a precompiler). Furthermore, as distributing them as libraries is also quick and easy, many people can participate in the development process by immediately employing and evaluating new versions of them. The feedback gathered from these experiences can then be used to improve the design.

As with almost every technology, not only in computer science, an extensible programming language can be used both adequately and inadequately, i. e., it can be used to make programming simpler and programs easier to understand by carefully defining and employing reasonable new language constructs, but it can also be misused to confuse programmers and to obfuscate code by unthoughtfully overwhelming a program with useless new language constructs. However, the best way to prevent misuse of something is not to avoid or forbid its use altogether, but to exercise and teach its appropriate use. Therefore, it might be advisable for a project team, a company, or a community to define and respect “language extension conventions” or “syntax guides” similar to well-known coding conventions and style guides.

Impressum    Datenschutz