safer casts - take II

Yigal Chripun yigal100 at gmail.com
Tue May 13 11:45:52 PDT 2008


I've just thought of an analogy to explain the different cast types:
[take this with a grain of salt, it's not meant to be discussed seriously]

casts are like doom cheats. the ones we used in doom 2 when we were just
kids with a 486 computer. (my first real PC. I had a 386 which broke
down after a few months which was then replaced to this model)

cast(T) gives you a one time bonus amount of ammo. in a very hard level
this can be understandable.
cast!(T) give you 150% health. this is a much more serious cheat which
in multi-player mode would be frowned upon unless everyone apply the
same cheat, of course ;)
reinterpret_cast!(T) is god mode and no one will want to play with you
like that. this is serious cheating you'll only use in single-player mode.

I'm sure I can Google the actual codes for those cheats ;) the must be
documented somewhere...

--Yigal



More information about the Digitalmars-d mailing list