How is it "compression?"
-
This Tweet is unavailable.
-
-
You can
#define union struct in C and most things will still work.1 reply 0 retweets 0 likes -
Replying to @pervognsen @won3d and
Any time you're using them for discriminated unions rather than for intentional aliasing, anyway.
1 reply 0 retweets 0 likes -
I guess compared to struct, sure, but you still pay in storage for the worst-case
1 reply 0 retweets 0 likes -
#define struct union gives you some real compression :)1 reply 1 retweet 10 likes -
Pretty sure Shawn is talking about _code_ compression, not _data_ compression. Switch statements let you easily collapse pieces that are the same in ways virtual functions do not, thus making the code more compact (not the data).
2 replies 0 retweets 3 likes -
Ah that makes more sense. I haven't typed the word "virtual" in my code in years.
1 reply 0 retweets 1 like -
You can actually add a -Dvirtual=brown_butthole to your compile line to make sure.
1 reply 1 retweet 3 likes -
that will clash with my preferred induction variable name
1 reply 0 retweets 3 likes
Ah shit sorry, that was not best practices on my part. I meant -Dvirtual=__brown_butthole
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.