Skip to content

Comment on C2 Lang design (2014) [pdf]parent

Comments

5. Example - Base Types: Uses uint8 in place of char. This obscures intent and makes code less readable. Compare: int library_fnc(char asterisk errmsg) versus int library_fnc(uint8 asterisk errmsg). (HN wants to turn my asterisks into italics...) In the former it's clear errmsg is a string, in the latter it's not clear (it could be a pointer to a flag).

You can always typedef it if you want it. The point is that naming a basic numeric type "char" is not only confusing, but also wrong in the world that's no longer all ASCII.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.