Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
donkeybeer
4mo ago
0 comments
Save
Share
Tbh I am finding it a bit hard to think of a use of integers that either isn't a length or a mathematical operation, so I gotta say it does narrow things down.
0 comments
3 comments · 1 top-level
top
newest
oldest
chuckadams
4mo ago
· 2 in thread
Bit fields? (Assuming one's not using a struct)
donkeybeer
OP
4mo ago
Good point. Yes if we need more than 8 flags we might need to consider one of the fixed length types.
direwolf20
4mo ago
Why 8? Some computers have smaller types. C has smaller types, as bitfields, but they're second–class. Why not just always specify the bits you need?
If you think 16 is probably enough and don't want to calculate, then specify 16.
j
/
k
navigate · click thread line to collapse