Relative Content

Tag Archive for type-casting

Alternatives to type casting in your domain

In my Domain I have an entity Activity which has a list of ITasks. Each implementation of this task has it’s own properties beside the implementation of ITask itself. Now each operation of the Activity entity (e.g. Execute()) only needs to loop over this list and call an ITask method (e.g. ExecuteTask()).

C++ Typecasting VS performance

Let’s say we’re designing a video game. We have some sprites on the map and we want to call some method of the particular sprite at some particular position.

When is type coercion a good idea?

When do you want (on purpose) to coerce type in JavaScript? I mean, beyond comparing strings and numbers, when does it benefit something you’re building?

When is type coercion a good idea?

When do you want (on purpose) to coerce type in JavaScript? I mean, beyond comparing strings and numbers, when does it benefit something you’re building?

When is type coercion a good idea?

When do you want (on purpose) to coerce type in JavaScript? I mean, beyond comparing strings and numbers, when does it benefit something you’re building?