Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
donkeybeer
5 days ago
|
parent
|
context
|
favorite
| on:
C isn't a programming language anymore (2022)
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.
chuckadams
5 days ago
[–]
Bit fields? (Assuming one's not using a struct)
reply
donkeybeer
5 days ago
|
parent
[–]
Good point. Yes if we need more than 8 flags we might need to consider one of the fixed length types.
reply
direwolf20
4 days ago
|
root
|
parent
[–]
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.
reply
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: