Another question about function brackets

Going through the tutorials ,mix it up chapter there is this line of code .
Why is the first function bracket before the mix - after the declaration of the variables ?
This makes it so difficult to read , is this just a matter of taste or am I missing something ?
Second piece is exactly the same but there I put the function brackets outside , except the ones for the second argument of the mix module ( which can’t be replaced anyway )…
Second question , is there any difference between mix.fill and array.fill when spreading the osc frequencies ,( see third posted example )…

///example from tutorial page Mix it up 
(
    var n = 8;
    { Mix.fill(n, { SinOsc.ar(500 + 500.0.rand, 0, 1 / n) })}.play;
)
////////////
///fucntion brackets replaced 
(
{
var n=8;
 
	Mix.fill(n,{SinOsc.ar(500+500.rand,0,1/n)});
}.play
)
//////////difference between Array fill and MIX ?
(
{
var n=8;
 
	Array.fill(n,{SinOsc.ar(500+500.rand,0,1/n)}).sum;
}.play
)
/////////////////

if you declare the variable in a block but outside the function you can use the variable anywhere in the block. But if you declare it within the function it is local to the function. In your example there is no difference

Mix.fill will is indeed equivalent to Array.fill … checkout the source for Mix and you will see the following method and comment:

	// support this common idiom
	*fill { arg n, function;
		var array = Array.fill(n, function);
		^this.new(array);
	}

gentle suggestion: you might find the answers to many of your questions in the source!

Almost… Mix.fill is equivalent to Array.fill(...).sum.

hjh