3 ms·
> Would it be possible to implement a programming language that supports as many features and paradigms as possible? Maybe it would be possible but it would be
by galaxyLogic 5y ago
> Would it be possible to implement a programming language that supports as many features and paradigms as possible?
Maybe it would be possible but it would be impractical and wasteful because
1. It would make it harder to learn all those features and easier to make errors in such a language when it is hard to learn.
2. You don't need all possible features because you can implement the same program using different features, features provide overlapping ways of doing the same thing.
It would be like trying to define a natural language that supports the syntax of all natural languages.
The challenge is not to create a language with more or all features. It is to provide a small subset of all possible features that makes it easy to write most programs in a very understandable manner. The problem with programming is trying to understand the programs created. You need to be able to understand the programs easily, economically, because else their maintenance becomes costly.
- HelloNurse 5y agoThe niche of "multiparadigm" programming languages is unusual because the easy way to write a general programming language is to make it low level and "no paradigm" (extreme case: virtual machines that externalize the language design layer) while the easy way to support a certain paradigm is making choices that hurt supporting other paradigms (most universally, going all-in on some feature to the exclusion of the opposite ones, like automatic and never explicit memory management in Java, or leaving second-class syntax and second-class implementations for everything else, like functions and types vs. records and strings in Haskell).
- Axeryon 5y agoDo you know Truffle for GraalVM? Support various types of languages, even very different from each other. https://medium.com/graalvm/java-on-truffle-going-fully-metacircular-215531e3f840 https://medium.com/graalvm/java-on-truffle-going-fully-metac... https://www.graalvm.org/22.0/graalvm-as-a-platform/language-implementation-framework https://www.graalvm.org/22.0/graalvm-as-a-platform/language-...
- Axeryon 5y agoI want to understand only any technical limitations (such as the incompatibility that some features may have), regardless of the success it would have in the market