Computer Programming Languages == Splenda
Every time I read about or learn a new programming language, I end up with a distinct feeling of dissatisfaction. They never quite live up to my expectations. Maybe I'm picky; maybe what I want is impossible. I don't know, but while I like most of several of the available languages, none of them satisfy. Here's what I'm looking for:
- Compile-able. This is critical. The last thing I need is yet another layer of abstraction to break at run time because something got upgraded. What happens is that, first, the application fails. Either it's some service (web, or server process) that goes unnoticed for several months, or it's some program that I don't realize is broken until I need to use it -- then I'm forced to rewrite it just to get it working again. This is software controlling me, not me controlling software, and it sucks.
- Functional. Side effects are evil.
- Concurrency integrated into the language at a syntactic level, such as Erlang, not tacked on like Java.
- Elegant syntax would be nice, like Haskell
- Support for units of measure, like Fortress
- Type inference, like Haskell. Seriously, the compiler should be able to figure these things out.
- Compose-able. I want mix-ins, and what's more, I want them embeddable within functions
- First-class functions.
- Garbage collection
- Support for efficient tail recursion
- Contracts
Other things I've been thinking about are toolkit utilities for stuff like:
- Verifying API contract dependencies
- Automated unit test generation (based on contract definitions)
In my fantasy language, you'd be able to write:
mixin Enumerable =
map f =
f first
while (k = next) != []
f k
someFunction myArgument =
newVar = mix Enumerable myArgument
otherFunction newVar
otherFunction e =
e.map printf
The syntax isn't that important, in this case; I'm just hacking out ideas. What's important is that:
- the compiler should be able to derive both the inputs and outputs of all of these methods
- we can dynamically extend classes, as long as they conform to an API