Why can't I instantiate a gameObject?

Hello,

I was looking at the instantiate command, and came across this in the scripting reference:

// Instantiates 10 copies of prefab each 2 units apart from each other

var prefab : Transform;

for (var i : int = 0;i < 10; i++) {
    Instantiate (prefab, Vector3(i * 2.0, 0, 0), Quaternion.identity);
}

Similarly, sometimes prefab is given the type Rigidbody. My question is, why is it done this way? Why can’t I directly make the variable prefab (in the case of the above code) a gameObject type?

Like this:

// Instantiates 10 copies of prefab each 2 units apart from each other

var prefab : gameObject;
    
for (var i : int = 0;i < 10; i++) {
    Instantiate (prefab, Vector3(i * 2.0, 0, 0), Quaternion.identity);
}

I tried that, and it didn’t work, but I can’t understand why not.

Also, is there any advantage to using Transform as the type over Ridigbody? I think all objects have a Transform component, so why not always reference it?

Thanks!

var prefab : GameObject;

Capital G