16
Programming / Re: Visual Studio so close to awesome
« on: July 04, 2015, 01:02:29 AM »By darker I meant more rare, somewhat complex, error-prone even. Explicit memory order of atomic operations is also modern standardised C/C++ but using it for ad-hoc synchronization without a good reason and whole lot of understanding is plain wrong. I am under impression you indeed understand what you're doing and therefore curious about the reason. I've seen a fair amount of C code and the only reasonable use for unioning was close-to-metal operation. Heavily constrained code, interfacing with hardware modules with particular layout quirks and all that stuff. Since it almost always came to jumping through code and documentation figuring what goes where, I came to conclusion this is somewhat like volatile, which is indispensable in its very narrow use case, but totally misunderstood and horribly misused in modern desktop code.I am just venting about an unfortunate bug that makes editing code that is both valid and supported by Microsoft impossible. Hopefully it's fixed in VS2015.
Don't intend to start some flame, just can't see how mashing several loosely related things into one can help in arguably high-level (as opposed to MCU programming) roguelike world. Would be nice to see some example =)
You've made an assumption about union. I don't know why. I can't sit here and defend it, as I think that I shouldn't need to. The benefits are obvious in my code, for the readability it adds. And being straightforward and readable is my main goal in my code. All I can do is hope that some day you'll try using it, and judge it on it's merits.
It's unfortunate when people imagine problems with things, and then proceed to discourage their use. The worst is the "goto considered harmful" meme.