I'm by no means a Haskell expert, but one of the worst parts of learning Haskell (or reading arbitrary code) is that there's no special syntax for partial application. Certainly that's a benefit in many cases if you're familiar with the signatures of the functions you're using, but it's definitely not explicit.
map{
tr/a-z/A-Z/;
print $_
}@array;
I don't remember the exact syntax, but the tr acts on $_ by default, and $_ starts out as each element of the array. my @array = qw/one two three/;
$_ = "Hello";
say;
map { tr/a-z/A-Z/ } @array;
say;
prints.... Hello
Hello
However remember it's a reference so using tr// will update @array... say "@array"; # => ONE TWO THREEWhich is sort of worse sounding, but it becomes quite natural once you start writing using types. I think of it like using legos.
makeLegoman :: Legs -> Torso -> Head -> Legoman
makeLegoman some_legs :: Torso -> Head -> Legoman
makeLegoman some_legs some_torso some_head :: LegomanLack of special syntax for partial application can be confusing for a lot of beginners; it certainly is very confusing if you're implementing, say, the continuation monad. But I think a lot of people overestimate the extent to which partial application appears in normal code: usually you fill up all the arguments except the last one, which is shuttled in via =<< or something similar. You don't have to think too hard about it, because the typechecker will make sure you've put all the functions together properly.
There are also many things that update $_.
You can call the function
foo :: a -> b -> c
like this bar = foo a
or like this: bar = foo a b.
In the first case bar will be a partially applied function of type bar :: b -> c
and in the second case it will simply be a value of type c.Actually, as far as I know, this is actually what happens in the background. I mean that calling
bar = foo a b
actually gets converted to bar = (foo a) b.I am aware of this. This is the source of some of my frustration reading Haskell code. I know that you can think of functions as single-arity first-class entities, but I've never been a mathematician and I've never thought that way.
I don't have enough experience maintaining large Haskell programs over a long period of time to know, but I suspect that this layering approach might encourage the kind of convolution you occasionally find in CL or Smalltalk programs where it's easy to build a teetering tower of the wrong abstractions. Perhaps there's something different about Haskell that encourages a more careful code curation, but I don't know.
Alternately, perhaps it's just a flaw in the way I think about Haskell that I want a visual distinction between partial application and calling a function.