  In this work, we study linear codes with the folded Hamming distance, or
equivalently, codes with the classical Hamming distance that are linear over a
subfield. This includes additive codes. We study MDS codes in this setting and
define quasi MDS (QMDS) codes and dually QMDS codes, which attain a more
relaxed variant of the classical Singleton bound. We provide several general
results concerning these codes, including restriction, shortening, weight
distributions, existence, density, geometric description and bounds on their
lengths relative to their field sizes. We provide explicit examples and a
binary construction with optimal lengths relative to their field sizes, which
beats any MDS code.
