NSNotFound is defined as NSIntegerMax, which has different values on 32-bit and 64-bit, this brings a lot of inconvenience for persistent and distributed env. Why not define it as -1?
PS, In ObjC and Cocoa, some indexOf... methods returns NSNotFound but some returns -1, is there a reason these results are inconsistent.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…