Re: more void* vs. char*

Raja Daoud (raja@tbag.convex.com)
Thu, 14 Mar 1996 14:27:18 CST

> The three choices really are:
> 1. (char *) with the additional restriction of null-terminated strings
> 2. (char *) of arbitrary character data
> 3. (void *) of anything.

> I don't think I've heard an argument that 2. contains advantages
> over 3. If being able to manipulate the info arg as a string
> (e.g., to print it out) is important, or if the simplicity
> of 1. is important, then 1. has an advantage.

In addition to these advantages for choice #1 (string manipulation and
simplicity), it enhances the chances for getting more portability down
the road (for example: "auto-magically" several implementations decide
that the string is a sequence of tokens with the "host" token specifying
the hostname, the "arch" token specifying the architecture, etc..).
This sets the stage for evolutionary standardization and IMO that's
a "good thing" to have. :-)

--Raja