CDentSpec - acmeism/cdent-cd GitHub Wiki

Welcome to the C'Dent Programming Language Specification.

C'Dent is not your average programming language. Actually it is exactly your average programming language. It takes all the modern OO programming languages like Perl, Python, Ruby and JavaScript and averages them into one. Well kind of. C'Dent is not average because it has no syntax. It defines programs as they look after they are compiled. That is, C'Dent defines the structure of an AST (absract syntax tree). Once you have a program in the C'Dent AST model, the C'Dent compiler can produce equivalent versions of this program in many programming languages.

But what good is C'Dent with no syntax? Well, I really meant that C'Dent has no particular syntax. It actually has many syntaxes. Pick your favorite C'Dent syntax, write a C'Dent program and compile it to whatever language you want it to run in.

Why would you want to do this? One word. Modules. The key to the success of modern programming languages is a healthy collection of nicely encapsulated ideas, in an easily installable package. Perl has CPAN. Python has PyPI, Ruby has RubyGems, Node.js has NPM. What if you could express your programming idea once, and have all the languages benefit at once? This is the goal of C'Dent: to make the best efforts of programmers in various languages contribute to the improved health of all languages.

Actually C'Dent is just one part of this. Packages contain several things: modules, scripts, documentation, tests, meta-information and installer/automation components. C'Dent is for writing the modules. There are other similar projects for addressing the other parts of making "Hack Once, Publish Everywhere", a reality.

C'Dent does not want to replace any of the great languages or communities around them. Not at all. It wants to have these languages encode their best ideas in a form that is sharable by everyone. This idea of reaching out beyond your native language to help others is known as Acmeism.

Since C'Dent has to compile to many languages, is ends up being something of a common denominator. This means that coding in it may not be as nice as coding in your favorite language. Don't worry. You won't be writing your day to day code in C'Dent. You'll only be writing the parts (modules) that you think will benefit everyone else.

About this document

Although this document is intended to grow to be a spec about C'Dent, for now it is just gathering of ideas.