News for hackers. Stuff that matters.
Re:Problems of C, and how Zig addresses them by vore on Monday July 03, 2023 @10:09PM (#36581328)
At that point, why not just call them i/u8/16/32/64? If the sizes are fixed anyway, why come up with different names for them, especially when almost all of the times you would want to select a different integer type is specifically because of how many bits wide it is? (otherwise, surely you would just use the machine word size?)
Re:Problems of C, and how Zig addresses them by WalterBright on Tuesday July 04, 2023 @12:07AM (#36582118)
Good question.

1. After 5 minutes, you know what sizes they are, and don't need reminding.

2. Easier to touch type.

3. They're just aesthetically more pleasing to the eye.

4. The names aren't really different, they follow the most-used (by far) sizes on C.

5. It's easier to say and hear them. I can say "int" when talking code with someone, instead of "eye-thirty-two".

6. I'm guessing it may be easier for a visually impaired coder with a screen reader.

Re:Problems of C, and how Zig addresses them by kaba0 on Wednesday July 05, 2023 @02:49AM (#36596418)
Just be honest with yourself and say that you subjectively like it better that way, as it grew on you.

There is nothing wrong with that reasoning. Also, there will never be a language which is perfect in every conceivable way, this is such a minor difference that if someone chooses a language over this alone, they are not being reasonable.

Re:Problems of C, and how Zig addresses them by WalterBright on Wednesday July 05, 2023 @01:44PM (#36604053)
A language is nearly all about subjective choices.