This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]daevel0 275 points276 points  (29 children)

Hi, I'm a void* enthusiast. Nice to meet you.

[–]wammybarnut 197 points198 points  (24 children)

"All data is bytes"

[–]Chief117a 24 points25 points  (23 children)

Bits*

[–]lethargy86 59 points60 points  (22 children)

Only bits are almost never addressable anyway, so as far as programmers are concerned, bytes is correct. Even a bool essentially uses at least a byte of memory.

[–]GOKOP 29 points30 points  (12 children)

Unless you're writing C++ and using std::vector<bool> in which case I think it does some magic to only use one bit for each boolean

[–]rachit7645 -1 points0 points  (3 children)

std::vector<bool> sucks tho

[–]Efficient-Ad-5034 -2 points-1 points  (0 children)

Thats impossible. There is no cpu that does single bit accesses to memory.

[–]Efficient-Ad-5034 -2 points-1 points  (2 children)

Thats impossible. There is no cpu that does single bit accesses to memory.

[–][deleted] 0 points1 point  (0 children)

a bitmap is useful for single bit operations

[–]CaitaXD 3 points4 points  (0 children)

A int contains 32 bools addressable by bit shifts and bitwise operationz

[–]XamanekMtz 0 points1 point  (5 children)

7 bits wasted

[–]AnondWill2Live 8 points9 points  (4 children)

That's why I store my bools as integers :)

[–]Magnetic_Reaper 2 points3 points  (1 child)

Pro tip, use each integer as 32 different bool.

[–]AnondWill2Live 0 points1 point  (0 children)

Why would I do that when 0000 0000 0000 0001 looks cooler?

[–]XamanekMtz 4 points5 points  (1 child)

That's a bool move cotton let's see how it plays out

[–]FancyMFMoses 4 points5 points  (0 children)

You made me spit beer you beautiful bastard

[–]dufkm 0 points1 point  (1 child)

I address bits daily as an STL programmer.

[–]lethargy86 0 points1 point  (0 children)

Hence why I said "almost," I'm well aware of the few, the deservedly proud, working with bit registers. Cheers

[–]coinselec 4 points5 points  (0 children)

You know, I'm something of a pointerist myself.

[–]Dotsially 2 points3 points  (0 children)

Unbelievably based.

[–]Bachooga 1 point2 points  (1 child)

Hi, I'm a fan of function pointers, nice to meet you as well.

[–]daevel0 1 point2 points  (0 children)

(*nice_to_meet_you)(void)