Wow, that generated substantially more (and more positive) response than I had expected. I guess it shouldn't come as much of a shock to me that others are feeling the need for a better toolkit, but I would have expected at least some backlash against the heavy-handed pragmatism [grin]
Yes, there's a real risk here of hitting "linguistic bloat" and trying to do too much with a single tool. However, I think that we also need to be wary of panicking over "bloated" languages. Sure, if we try to do too much in one tool, we're going to end up with a tool that does very little well. The question, though, is what delineates "too much." I think Ruby is a shining example of a very rich language that is done right.
Issues like semantic expressivity, contracts, and multiprocessing are real issues. These are things that I know, from in-the-trenches experience, cause major trouble when using existing languages. Those are the challenges that are genuinely going to shape the next decade of programming.
Software quality is not going to rise significantly without the ability to express semantic and contractual behavior within a language. The managed-everything model of .Net has proven a reasonably effective counter to the manual memory-management nightmare of the C/C++ world, but there are many monsters left to slay. I can state with absolute certainty that, in my experience, 90% of run-time bugs arise from violations of semantics (discounting multiprocessing issues). In probably 85% or more of those cases, the semantics should have been expressible in the language itself; if that feature were available, a good third of the bugs could have been nailed before compile-time, and the rest would have barfed at run-time during unit testing, long before a serious problem arose in production.
When multiprocessing comes into play, shared-state languages like C++ are simply massive failures waiting to happen. They are impossible to validate automatically. They cannot be tested rigorously on every possible hardware configuration, which is bad, because every hardware configuration (and even some software interactions) might subtly change the behavior, and lead to synchronicity issues that otherwise would never have manifested.
Those areas absolutely must be addressed. Without fixing those problems, we are going to take one of two routes. Either we'll continue to try to patch the holes in C++, with increasingly bad results, or we'll proliferate a group of domain-specific (or at least domain-restricted) languages. Already this proliferation is beginning to occur. I have absolutely no disagreement with having multiple languages; indeed, every problem space has its ideal language, and this will always be the case.
However, my dream here is to see a single language, or at least a very tightly-knit family of extremely similar language dialects, be able to cater to a wide array of problem domains. C++, with its multi-paradigm support and ability to live close to hardware, is frankly the closest thing we have to such a language for the time being. We can do much, much better than C++.
I see no reason why languages in different domains must, by necessity, have vastly different philosophies and syntaxes. Yes, there are going to be edge cases where certain highly distinct domains need highly distinct languages. I'm not concerned with those fringe cases, because they amount to a tiny fraction of software development. The real bulk is in three main areas: consumer applications, business logic, and games. Those three domains should be easily unifiable under a single language family.
Instead of writing my web server in C++ and my webpage logic in PHP, I should be able to write my web server in Foo at a low level of abstraction, and then build webpage logic in Foo at a high level of abstraction. Foo should then let me make use of a flexible compilation/execution model to either compile the logic directly into a binary executable (for, say, embedded hardware or highly performance-critical scenarios) or let me use a JIT-compiled setup similar to ASP.Net or the Zend engine, where external users can upload script files that are executed dynamically by my server software. I shouldn't need two different languages here.
Having a unified language structure gives me three advantages.
- Utter control over bindings between application layers.
If I develop a suite of tools called Quux in C++, and want to access it from PHP, I have to build an extension to the Zend engine. That's a waste of time. If Quux is written in low-level Foo, and my web logic is written in high-level Foo, the bindings already exist: the interface for Quux just needs to be imported (via a Java/.Net style system) into my web logic, and I now have access.
- Consistency of semantics across layers.
If Quux returns a value that may only range from -1 to 3, that contract can be expressed in Foo. Foo can then expose that contract to the web logic. I have now used a contract to help kill bugs in Quux, and now without any additional effort, my contract can help kill bugs in the web logic, too. Imagine the implications for things like web security. SQL injection would become a distant memory. Buffer overruns, covert data manipulation, and data-execution would all go away.
- Control over execution models.
In an ideal world, Foo should allow me to run in many ways. I should be able to compile suitably low-level Foo into machine code. That wins us portability, because now Foo frameworks are easy to port to new OSes and hardware. (That's why C and C++ are so ubiquitous even outside of Windows, while .Net, despite all of its awesomeness, is unlikely to do anything on other platforms any time in the visible future.) I should be able to JIT-compile Foo for performance and to insulate against changes in supporting library code, similar to the way the JVM and .Net models work. I should also have the option of interpreting Foo on the fly to allow for dynamic and self-modifying code at high levels of abstraction. There is no reason why any one language should be bound tightly to a particular compilation/execution model. We simply need to make sure that programmers are aware of the caveats of each.
I'm certainly interested in continuing this line of thought. Acting alone, it would probably take me the bulk of my career to really ever get anywhere with specifying and implementing such a huge project. I think the success of this kind of an initiative is going to depend entirely on massive support from the development community and from existing vendors.
IMHO, Foo absolutely has to have a simple interconnect mechanism for talking to C-style APIs. That immediately makes it a viable contender for Windows and Linux development, which is absolutely critical to adoption. That also allows for more cool stuff, like bindings to C++, which can then marshal to managed code in .Net.
Foo will not survive if it tries to recreate the programming paradigms of the world from scratch. Foo will only survive and succeed as a parasite, drawing on existing, established code, and allowing a gentle transition from current modes of thought and coding to more productive and safe ones. That kind of interconnection requires big-league backing, and lots of people looking over things to make sure it all works.
A couple of people have suggested opening up a more broad discussion someplace. I'm all for this. I'll put together a quick set of links to my journal entries and post it up in the Software Engineering forum, since that will make things much easier to discuss widely. If anyone has any ideas for an even better location, please let me know, and we'll work something out.
The thread is up. Enjoy!