[TUHS] origins of void* -- Apology!
bakul at bitblocks.com
Tue Nov 7 11:09:09 AEST 2017
> On Nov 6, 2017, at 4:25 PM, Ron Natalie <ron at ronnatalie.com> wrote:
> I believe one of C’s biggest failings is that they did not solve the schizophrenic definition of char*.
> Char* as historically implemented and then CODIFIED in the C and C++ standards is both the basic character type as well as the smallest addressable unit of storage.
> This was all peachy keen in the 8 bit ASCII days (and even earlier alternative character sets such as EBCDIC, and its predecessors and other historical character sets like UNIVAC’s fielddata), but fell apart when we started into the 16 bit and larger UNICODE.
> We needed a basic memory type that had sizeof == 1 (which void*) did not meet and release char from having to play double duty.
C has had uint8_t since C99.
void* serves a different purpose. It says this is an
untyped pointer (or a ptr to an instance of any type)
so no question of size being an issue. It shouldn't
even have been "void*". I would've preferred _* and
_ instead of void* and void. Much more appropriate for
a concise language like C!
More information about the TUHS