News for hackers. Stuff that matters.
Re:How to Write Unmaintainable Code (2017) by evozer on Friday August 17, 2018 @09:57AM (#17782841)
If you want to be more efficient, you can also use a union for this.

typedef union { int i; float f; double d; long l; char c; void *p; ... } var;

Now you might also get some nice float-interpreted-as-int bugs if you forget the type!

You can also kind of pretend that you have C#-style type inference:

var x = { .i = 10 }; var y = { .f = 2.0f };

Re:How to Write Unmaintainable Code (2017) by bausshf on Sunday August 19, 2018 @11:51AM (#17794725)
But you don't want to be efficient lmfao