Every developers dream, part 1

I think I am not the only one having these dreams of a wonderful world where everything works the way you’ve thought it out. The only problem is that it will probably never come true, but why can’t we dream about it. So here is my list of things I’d like to change in the world to make it run my way…

Super-language. Everything you use, and you make is written in some sophisticated language that suits anyones needs. Every one of those languages has it’s advantages and drawbacks. Now we all know that the problem mainly exists, because you have to write a lot of code to deal with complex tasks. For example to open up a window in Win32 API you have to write some 100 lines of code. Althogh you could do the same thing only in 10 lines of code in C#. Not to mention that the syntax is like day to night. The drawback here is that you have to trade less number of lines versus high(er) performance. Then there is this thingy with static typing vs. dynamic typing. And the list could go on an on.

My dream of super-language is basically to make ONE syntax and be able to compile it to machine code, turn garbage collection on or off, or just write script in the same language and pass it through interpreter.  I’d definitely go with Java/C# syntax. Of course C++ style static/object method calls are much easier to read when you have “->” or “::” operator in between, but then again we could just drop it in favor of “.”. Also good to mention that the language should be object-oriented and at the same time procedural for all those simple task lovers. Pointers? Of course! Even in the interpreted one. Sounds quite messed up, but think again what could we gain with it?

  1. One syntax for operating system developers, administrators, web developers, you name it. Everybody is involved.
  2. Once somebody with not so great knowledge in cleaning up after himself has written a great library as interpretable script, somebody can just do some code refactoring, adding cleanup where necessary,  making it static typed and compile as binary library, making it run lightning fast. Still the code could be run through interpreter and updated, and recompiled afterwards.
  3. Even dynamic typed script could be pre-compiled (think PYC), with a speed increase.
  4. Abstraction layers build in any level, and could be transfered from any level to others. There is a problem with shared hosting servers where you can’t just ask to compile some misc. library for php to use it in your php built CMS. In this language/environment you could just load source and make it run as interperted code (slower, yes, but there would be no limits).
  5. Garbage-collected vs. I’ll-do-it-my-self – just some pragma directives in your code and your lazy ass is ready to roll. You think GC is dragging your code down, disable it in your code, do some refactoring and compile it to machine code – Über Fast!

The only problem I see is a classic security problem – too much is allowed in, for example, shared hosting environment, but that could be rearranged trough interpreter settings. For example asm() method is not allowed (not available, or just a dummy wrapper so that you do not have to remove that code). Also some open_basedir restrictions could be implemented, some “restricted functions/classes” directive could be implemented too. That brings to the “other” problem, nothing runs exactly the same way it ran when compiled – well I said it never gets really easy, but this could be a great start.

Now one more advantage – teach this language in schools, forget C/C++, start with the interpreted version, which could be less error prone and allow to make mistake here and there. Then move to byte code compiled/garbage collected version – next level of education, and finally go into details of lower level functionality, machine code compilation for specific instruction sets, etc. Voila perfect and easy IT education. That is what I would love to call a supreme-language, too bad it does not exist in real life. 🙁

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published.