> It doesn't mean much to call out "special support" for any one bit of style of programming, since the language itself has nearly no concept of performance -- you just write functional code and the compiler will find the fastest runtime computation of the evaluation that it can.
While GHC is glorious, it's still very limited in what it can do, performance wise.
You are right that languages themselves seldom have a direct concept of performance. But language features and restrictions have a big impact on achievable performance. Eg Haskell's purity-by-default means that the compiler has quite a bit of freedom when choosing how to translate something like eg the 'map' or 'filter' functions.
The equivalent in C++ gives the compiler less flexibility, because the helper function handed over at runtime might have side-effects.
Similarly, Haskell functions are still allowed one important side effect: non-determination. In a more restricted language like Agda that's not allowed. Thus giving the compiler more degrees of freedom to work with.
Or in a different direction: the query optimizers for SQL can do very impressive work, because SQL is so limited.
While GHC is glorious, it's still very limited in what it can do, performance wise.
You are right that languages themselves seldom have a direct concept of performance. But language features and restrictions have a big impact on achievable performance. Eg Haskell's purity-by-default means that the compiler has quite a bit of freedom when choosing how to translate something like eg the 'map' or 'filter' functions.
The equivalent in C++ gives the compiler less flexibility, because the helper function handed over at runtime might have side-effects.
Similarly, Haskell functions are still allowed one important side effect: non-determination. In a more restricted language like Agda that's not allowed. Thus giving the compiler more degrees of freedom to work with.
Or in a different direction: the query optimizers for SQL can do very impressive work, because SQL is so limited.