I get confused. Nowhere in the datasheet did I read if it's inverting or non-inverting. Is it's just how you use it, which input you choose to be the reference voltage?
And my second question is about comperator vs. op-amps. It seems that people use it interchangably which would suggest they do the same thing. Eg. in this article https://www.circuitstoday.com/voltage-comparator they state
Whenever Vin goes above 6V, the output swings to ~+12V DC and vice versa.
However, in the datasheet I see this diagram and it seems to me, out will never be +VCC , not without a pullup on out anyway.
So are comperators and op-amps the same? Am I missing something here?
You're missing the (implied) external pullup resistor. Look at the rest of the data sheet, it will make this very clear, in the application or test circuit section. See 8.2 Typical Application.
Your other question - op amps are designed for linear (analog output) operation, comparators non-linear (binary output) operation. They can sometimes be used interchangeably, but they are heavily optimized for one purpose or the other.
Only a complete circuit can be inverting or non-inverting. No op amp or comparator can be called that, it is just a differential amplifier.
While one can argue a comparator may be less costly the real difference is speed.
The internals of a comparator are optimized for speed, making them much faster than opamps. Not just a little faster, much faster.
An opamp's internal circuits are optimized for linearity and gain. They are designed to be operated in a closed loop configuration (i.e. the two inputs have no voltage difference).