Language Features “a la carte” is an ongoing student project that allows you to check that a Scala program uses a specific subset of language features:
Scala is a general purpose programming language that supports multiple programming paradigms.
However, in some cases it is useful to restrict the language to a subset of its features. For example, a project may have policies about the code style that should be used (see for instance the WartRemover project that helps other projects to implement such policies). Also, tools performing verification on code may not support all the language features. Last, teachers may want to progressively introduce the language features.
All these use cases need a tool checking that a program does not use some specific language features.
Currently, scalafix and the aforementioned project WartRemover can check that some language features are not used.
However, the set of supported language features is incomplete. The goal of this project is to create a tool able to cover more features, such as contextual abstractions, abstract methods, method overrides, higher-kinded types, quotes and splices, etc.
This project could be applied in the context of teaching, for instance, to check that two solutions to a problem use different programming styles (OOP vs FP), or to make sure that a solution that is expected to be implemented in a pure FP style does not make use of mutability.
If you feel like such a project would be useful to you, we would be interested in knowing more about your use cases, and how you would like to use the tool in practice. Also, feel free to watch the project activity on GitHub and to contribute to it!