It should discharge to a point where there will not be damage, nor safety issues like people that will be scalded, and should be visible so you know it discharges.
The pipe also has to be continuously pitched downward so it drains dry and cannot get an ice plug in it.
The pipe also cannot reduce in size...
And as stated above the all important part check your local code!
Most of the piping I have seen is required to terminate into a French Drain. This is to prevent anyone from getting scalded by a sudden gush of hot water.