Question: As a programmer, I often look at some features of the language I'm currently using and think to myself "This is pretty hard to do for a programmer, and could be taken care of automatically by the machine".

One example of such a feature is memory management, which has been automatic for a while in a variety of languages. While memory management is not that hard to do manually most of the time, doing it perfectly all the way through your application without leaking memory is extremely hard. Automation has made it easy again so that we programmers could concentrate on more critical questions.

Are there any features that you think programming languages should automate because the reward/difficulty ratio is just too low (say, for example concurrency)? 

This question is intended to be a brainstorm about what the future of programming could be like, and what languages could do for us to let us focus on more important tasks, so please post your wishes even if you don't think automation is practical/feasible. Good answers will point to stuff that is genuinely hard to do in many languages, as opposed to single-language pet-peeves.

Answer: 
[Concurrent programming](http://en.wikipedia.org/wiki/Concurrent_programming)/[parallelism](http://en.wikipedia.org/wiki/Parallelism_(computing)) that is (semi-)automated, opposed to having to mess around with threads, callbacks, and synchronisation. Being able to parallelise for loops, such as:

```
Parallel.ForEach(fooList, item =>
{
    item.PerformLongTask();
}

```

is just made of win.

Certain languages already support such functionality to a degree, however. Notably, F# has asynchronous workflows. Coming with the release of .NET 4.0, the [Parallel](http://blogs.msdn.com/pfxteam/archive/2008/06/02/8567802.aspx) [Extensions](http://en.wikipedia.org/wiki/Task_Parallel_Library) library will make concurrency *much* easier in C# and VB.NET. I believe Python also has some sort of concurrency library, though I personally haven't used it.

What would also be cool is fully automated parallelism in [*purely functional*](http://en.wikipedia.org/wiki/Purely_functional) languages, i.e. not having to change your code even slightly and automatically have it run near optimally across multiple cores. Note that this can only be done with *purely* functional languages (such as Haskell, but not CAML/F#). Still, constructs such as example given above would be very handy for automating parallelism in object-oriented and other languages.

I would imagine that libraries, design patterns, and even entire programming languages oriented towards simple and high-level support for parallelism will become increasingly widespread in the near future, as desktop computers start to move from 2 cores to 4 and then 8 cores and the advantage of automated concurrency becomes much more evident.
Persistence, it seems to me we write far too much code to deal with persistence when this really should be a configuration problem.