What is the alt stack? I noticed in the bitcoin wiki script page (https://en.bitcoin.it/wiki/Script) that there were two opcodes named:

OP_TOALTSTACK
OP_FROMALTSTACK


It looks like there is another stack that can be used separately as a data store, simply pushing and popping data. I've never heard of this before, but it seems like a very useful feature. 

Can anyone verify that this is what the alt stack is actually meant to be used for? If not for just pushing and popping data, what is it for? Do any specific use cases come to mind?
Here's where they're defined:

            case OP_TOALTSTACK:
            {
                if (stack.size() &lt; 1)
                    return false;
                altstack.push_back(stacktop(-1));
                popstack(stack);
            }
            break;

            case OP_FROMALTSTACK:
            {
                if (altstack.size() &lt; 1)
                    return false;
                stack.push_back(altstacktop(-1));
                popstack(altstack);
            }
            break;


Example:

Stack:
Alternate Stack:
Script: OP_1 OP_2 OP_TOALTSTACK


.

Stack: 01
Alternate Stack:
Script: OP_2 OP_TOALTSTACK


.

Stack: 01 02
Alternate Stack:
Script: OP_TOALTSTACK


.

Stack: 01
Alternate Stack: 02
Script: 



  what is it for? Do any specific use cases come to mind?


It's... use-impaired. 99% of the time, you can avoid using OP_(TO|FROM)ALTSTACK by putting things onto the stack in a different order. There are 18 stack manipulation operators, but only one (OP_DUP) is used with any regularity. I'm of the opinion that Bitcoin scripting is overcomplicated for its intended use.