I've designed a language that I plan to implement soon in F#. It is not your ordinary language, but a modular language that is usefully-defined only once a user-defined 'language module' is plugged in. It is in the vein of the modern 'language workbench' tools, but far more lightweight. SICP readers will know it as the metalinguistic abstraction. I will explain the motiviation for this language, and will then paste the current spec for discussion.
After many years of typical programming, I've concluded that imperative approaches to programming generally lead to monolothic code bases. This is regardless of the mercilessness with which refactoring is applied. I have concluded that any time one wishes to solve a non-trivial problem in programming, one should find a declarative way to solve that problem. The language I provide gives a foundation upon which declarative languages can be built to solve these problems, thus removing the main impediment to using declarative techniques to solve normal problems.
By customizing the language with an appropriately-defined module, one can express the declarative languages needed to solve programming problems normally implemented in the imperative style. Even high-grade functional programmers will concede that imperative programming has a place in simulation and UI development. With the modular language and one of the languages implemented with it below (DOL), I will try revoke that concession. I will show that simulations and UIs, the typical bread and butter of high-level imperative programming (OOP), are better implemented with a declarative language.
Below is the spec as it is. Please note some formatting was lost. Also note that the syntax is a bit ugly due to the use of s-expressions. I am using a very simple syntax solution to make the language as implementable for myself as possible. I would hope to improve the syntax in a fork later.
If anyone has any questions in person or would like a copy of the more readable original spec, please mail to email@example.com . Thanks all for reading!
If you're serious about writing a new programming language, then you really need to demonstrate how your language differs from other languages. In particular it must do one of the following:
a) Be nicer for the programmer, either because it is faster for them to write, easier for them to use, more elegant for certain classes of problem or catches more programmer errors earlier on
b) Demonstrate that the resulting program can do something that is otherwise very difficult to do in traditional languages (e.g. faster to parallelize, easier to run on clusters)
c) Or just be substantially "better" for a particular class of problem.
Secondly it must fulfil all of the following criteria:
i) If you can think of it, and it is reasonably within the scope of the language, it must be possible to write a program to do it in your language (i.e. the language must be "complete")
ii) Are there common types of problem which your language are much worse than other languages for programmers? For runtime? For compile-time? Bear in mind that learning a programming language - no matter how elegant it may eventually seem - takes time away from the programmer actually doing stuff, so the benefits need to substantially outweigh the problems.
And finally before anyone will pick up your language you need to:
1) Write some common programs (not just "Hello World", but that's always a good start) written in the language
2) Preferably write a compiler for your language, and if necessary a virtual machine - or at the very least write an interpreter (no matter how slow) so that people can play with your language.
I don't mean to stomp on your work, and I'm sorry if it sounds like it, but there are lots of languages out there and if you want your language to take off you really need to show the programmers who will have to learn the language what benefit they'll be getting and give them the tools to use the language - otherwise they'll never use it.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.