The Future of Programming Languages
I have been hinting at what I think is important in programming languages, in various blog posts, and I figure it is about time that I offer my own vision of the future of programming languages, in about ten years.
Here is a list of my predictions about what some of the more popular languages for large-scale application development will look like in about ten years:
- Arrays will no longer be the defacto collection: people will use interfaces that describe an appropriate collection, or use an adaptive collection type. An adapative collection adapts dynamically to usage patterns, by switching the concrete implementation of an interface.
- Generic programming will be common-place. Language support for generic programming will subsume the C macro pre-processor and template meta-programming.
- Type inference will be the norm, and even more powerful type-inference algorithms will be available (e.g. recursive type inference, and higher-order kind inference)
- All dynamic languages will have static type systems that help with optimization, tool support, but that don't restrict language semantics.
- Annotations are going to improve and replace hard-coded language concepts like "const", "public".
- Virtual functions will be considered outdated, and interfaces will become the norm. Compilers will start being smart about how they deal with interfaces, and start performing higher-level optimizations of code.
- UML is going to start becoming more closely related to code, and become relevant in the lives of most programmers. We will fortunately not be forced to use diagrams directly because most tools will synchronize code and UML automatically.
- People will stop using data-sharing, and start using message passing models and immutable data structures.
- State machines will be integrated into languages used for developing GUIs, to describe object lifecycles, and make distributed computing easier.
- Assertions and constructs are going to be first class language constructs, and theorem provers built in to the compiler, will verify these assertions as much as possible.
- Lambda expressions and higher-order functions will be common-place, and far more efficient than ever.
- Cross platform programming will become much easier.
- There will continue to be many languages to choose from, but we will probably see a standardized protocol for language interoperability.
- The notion of source code will become that is an abstract view of the program which is more accurately described by the abstract syntax tree (or a model)
- Raw memory access will be verboten.
- Mixins or traits (i.e. any kind of interface + implementation) will replace multiple-inheritance.
- The notion of delegation of interface implementation will become commonplace (e.g. my field X implements interface Y) encouraging object composition versus object inheritance as the defacto method of reuse.
- Aspect oriented programming will be achieved using a simple combination of reflection and annotations. In other words no more "select functions which start with get_xxx).
- Build and execution phases (e.g. compile-time, run-time, debug-time) will see the addition of new explicit phases recognized by languages: generate-time (when code generation occurs, such as for AOP), verify-time (when the program has a chance to self-check the abstract syntax tree for consistency) as well as load-time and unload-time phases.
So these are some of my predictions which concern programming languages intended for medium to large-scale application development, over the next ten years. I think it is important to note that the D and Scala languages I think are already on their way to achieving some of these predictions. I would love to hear your predictions.