Encoder mode and comparator?

In the STM32F030x4/x6/x8/xC and STM32F070x6/xB reference manual (RM0360, ch 13.3.16) it says "However, comparators are normally be used to convert the encoder’s differential outputs to digital signals. This greatly increases noise immunity."