Introduction
The quest to create a programming language that simplifies syntax while maintaining object-oriented principles has long fascinated computer scientists. Among the most compelling approaches is adapting the Smalltalk-like syntax with an object-oriented philosophy, running on an Erlang virtual machine. This article delves into the feasibility and implications of such a language, drawing on concepts like Turing completeness and the Church-Turing thesis.
Turing Complete and Computational Equivalence
To understand the feasibility of creating such a language, we must first explore the notion of Turing completeness. A computational system is Turing complete if it can simulate any Turing machine, meaning it can perform any computation that can be described algorithmically. The Church-Turing thesis posits that any effective computation can be performed by a Turing machine, making it the theoretical limit of what is computationally possible.
Given the computational equivalence of all Turing complete systems, it follows that if one language can perform a computation, any other Turing complete language can as well. Therefore, if a language like Smalltalk, with its elegant syntax and object-oriented philosophy, can perform a computation, any other Turing complete system, including an Erlang virtual machine, can too. This computational equivalence is a fundamental pillar of modern computer science. However, as we'll see, being computationally equivalent is not the same as being meaningful, useful, or practical.
Smalltalk-Like Syntax and Object-Oriented Philosophy
Smalltalk has long been celebrated for its clean and intuitive syntax, which aligns with an object-oriented programming paradigm. In Smalltalk, everything is an object, and objects communicate through message passing. This paradigm significantly simplifies the understanding and maintenance of complex systems, making it a powerful tool for modern software development.
While the idea of porting this elegant syntax and object-oriented philosophy to another virtual machine suggests an intuitive and elegant programming experience, it encounters practical limitations. The success of a programming language hinges on not just its theoretical possibilities but also its practical utility and user community. Languages like Smalltalk have enjoyed widespread adoption in specific niches, such as graphical user interface development and educational environments, due to their ease of use and flexibility. However, a Smalltalk-like language running on an Erlang virtual machine would require overcoming significant hurdles:
Compatibility: Integrating Smalltalk's messaging system with Erlang's concurrency model would be a significant challenge. Erlang's lightweight processes and message-passing model are designed for high-concurrency scenarios, whereas Smalltalk's messaging is more flexible and less structured. Ensuring compatibility without sacrificing efficiency is a non-trivial task.
Performance: Despite the elegance of Smalltalk's syntax, its performance can lag behind compiled languages. If the goal is to create a practical language for real-world applications, performance optimization must be a top priority. Compiling Smalltalk to the Erlang virtual machine (VM) would necessitate overcoming the performance compromises inherent in interpreted languages.
Ecosystem: A crucial factor in the success of any programming language is its ecosystem, including tools, libraries, and community support. While Smalltalk and Erlang each have vibrant communities, creating an entirely new ecosystem from scratch is daunting. Integrating and extending existing Erlang tools and libraries would be critical for a new language to gain traction.
Is It Meaningful, Useful, or Practical?
Given the complexity of the challenges mentioned above, the question remains: is it meaningful, useful, or practical to create a Smalltalk-like language running on an Erlang VM? The answer, in most cases, is likely to be no. If it were easy to do, it would have already been done, and someone would have spread the word about its benefits and drawbacks.
The pursuit of a more simplified or intuitive syntax and object-oriented philosophy can be a worthwhile endeavor, especially for educational purposes or specific application scenarios. However, for general-purpose programming, the existing landscape of languages with a strong object-oriented foundation, such as Python, Ruby, or even newer languages like Rust, provides sufficient tools and performance without the overhead of reinventing the wheel.
Moreover, the Church-Turing thesis guarantees that if a problem can be solved algorithmically, it can be solved by any Turing complete system, including an interpreted Smalltalk-like language on an Erlang VM. This does not mean that the solution is viable, efficient, or optimal.
Conclusion
In conclusion, while the theoretical possibility of creating a Smalltalk-like language on an Erlang VM exists, the practical challenges are formidable. The advantages of a simpler and more intuitive syntax must be weighed against the limitations of performance, compatibility, and ecosystem. If the goal is to innovate within the constraints of known and tested methodologies, existing languages and virtual machines provide a more viable and efficient approach to achieving the same objectives.