  We provide an algebraic description for sum-rank metric codes, as quotient
space of a skew polynomial ring. This approach generalizes at the same time the
skew group algebra setting for rank-metric codes and the polynomial setting for
codes in the Hamming metric. This allows to construct twisted linearized
Reed-Solomon codes, a new family of maximum sum-rank distance codes extending
at the same time Sheekey's twisted Gabidulin codes in the rank metric and
twisted Reed-Solomon codes in the Hamming metric. Furthermore, we provide an
analogue in the sum-rank metric of Trombetti-Zhou construction, which also
provides a family of maximum sum-rank distance codes. As a byproduct, in the
extremal case of the Hamming metric, we obtain a new family of additive MDS
codes over quadratic fields.
