Some typical factors would be 1) does your plan allow for loans; 2) what are the terms of repayment; 3) are the less expensive areas to borrow from; 4) can you repay the loan if you lose your job. When you "borrow" from your 401k, you are "leveraging" the amount you have in the plan, hence, most plans will charge you interest. David, there is also a time limit generally to pay that loan back. If you fail to pay the loan back under the agreement, you will experience an early payout for the balance remaining unpaid, which may be subject to the 10% penalty if you are under age 59 1/2, plus the tax due. Every dollar you consider using has a cost to it. Review all pools that may be acceptable to you to find the least expensive avenue, with the least amount of risk to you.
That depends on your plan's provisions. Most plans permit a hardship withdrawal, which could be used for buying a house.