The Perfect Programming Language

After slaving over a large project recently, I found myself spending more time thinking about how much I hate restrictive programming paradigms. In this series I attempt to describe a Perfect Programming Language.

The goal is to create a meta-paradigmatic meta-language that can solve problems through the specification of language features within its own syntax. In this sense, the language should be able to achieve completeness from a simple set of rules- no different from the single axiom of Boolean algebra. This would make both the user-interface (language, syntax, grammar) and the engineering (parser, interpreter, compiler) relatively simple to implement. All keywords would be definable within the language itself. I propose that this can be achieved by conceptually abstracting all code in terms of self-describing expression-tables (described more specifically in third part of this series C-Killer).

Note that I have no formal education or experience with language design specifically, so many of the ideas presented here could just be bad or wrong- you have a moral obligation to leave comments and let me know. I did, however, study general principles of design. I probably won't be using formal nomenclature in this sense, but when we talk about Syntax what we're really talking about is Affordance. Since this series is more for software people than design people, I will avoid any pedantic references to design principles (apart from discussing how a Language is a User Interface).

I have no delusion about the use of the word 'Perfect.' I'm describing my thoughts on the matter and how I will attempt to achieve that. 'Perfect' is just a buzz-word.

  1. In the Introduction I describe a few grievances and explore a bit of the theory behind languages.
    • I'm infinitely more concerned with the UI that I am using to develop software- the Language.
    • A language shouldn't just perform tasks as we describe, but describe to us how a task will perform.
    • Our solution may emerge through specificity of a paradigm rather than applying a general paradigm to a specific problem.
  2. I then describe the basic premise.
    • The solving of a problem with programming is the accretion of a general paradigm into a specific one.
    • The question of solving a problem ... starts with the meta-question of what paradigm to use. It follows that the most inclusive programming paradigm is one that attempts to answer the paradigm question directly.
    • I want to be able to encapsulate all of these ideas within a single meta-paradigm- and it can all be done with a single type and unified syntax.
  3. In C-Killer I actually start talking about how the language works, built up from expression-tables.
    • The difference between an associative array and a function is mainly appearance, If we can conceptually think of all functions and types as expression-tables, then there is quite a lot of flexibility we can achieve.
    •  I believe that there is a single "gender fluid" data type that can be used to conceptually encapsulate grammar rules, functions, classes, expressions, data structures, arrays ... This type would be a Table that is an expression that describes itself- not unlike a particle-wave duality.
    • Scope implicitly and intrinsically handles concurrency and memory during the evaluation of an expression-table.

  • TODO:
    • Syntax
      • Grammar declaration vs expression declaration
      • Representing simple data types
      • Defining all keywords and concepts within the syntax itself.
    • Engineering
      • Bits as Expression-Tables
      • Compile-time optimizations
      • Dealing with side-effects without making special cases
    • Formal Specification
    • C-Parser and compiler

No comments:

Post a Comment