¿Por qué usar CFTimeInterval en lugar de solo el doble?

What is the reason of using CFTimeInterval instead of double in Objective C?

preguntado el 04 de septiembre de 13 a las 02:09

semantics and maintainability in case the underlying data type changes -

Here's a better question - why would you ever use something like double to represent time? -

1 Respuestas

The actual type used might change from one platform to another, as int did when CPUs transitioned from 32 to 64bits. Also, variables defined with the platform independent type could be considered more self descriptive - nobody will wonder if a CFTimeInterval variable is in hours, milliseconds, etc, because the type is documented to mean seconds.

Respondido el 04 de Septiembre de 13 a las 02:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.