If we can express a function as a distribution, then considering only distributions will not exclude functions, hence there would be no loss in generality. The fact that we can indeed express a function

as a distribution

is based on using a "delta function" which allows distributions to put all the probability on a single value of

, thus making it effectively a function since

is uniquely determined by

.