Given a choice between digital coaxial and toslink, which should be chosen?

My understanding is that the two connectors essentially perform the same operation - to transmit the digital information from the component to the receiver/decoder.

If my set-up will require less than a 6 foot length of any one connector, are there advantages to choosing one over the other (quality, price)?

Thanks.
Adrien