Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: usecases of void foo(char **b) {} Date: Sat, 12 Nov 2016 14:47:57 -0800 Organization: None to speak of Lines: 29 Message-ID: References: <49899127-bf04-4a84-a374-5bebfbe7f4f7@googlegroups.com> <8f154274-4b6f-41f3-8489-c94f98e5c559@googlegroups.com> <4b008cb8-2691-4e65-b725-3acddda41eb7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="f830fb76aec43d91603702f100a3d579"; logging-data="24495"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2dYLQDm1KEtQPxnKY79US" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:1rKqbsraq5C9u6zg/4S3NzX4Kug= sha1:PP5nBzyCZc9XnGlJ8wUmxqW4/BY= Xref: csiph.com comp.lang.c:96440 Tim Rentsch writes: > Keith Thompson writes: > >> BartC writes: >>> On 02/11/2016 18:47, Keith Thompson wrote: >> >> [...] >> >>> What I was doing was similar to: >>> >>> typedef char* string; // pointer to zero-terminated sequence >> >> I understand that that typedef is common. I dislike it, because, once >> again, a char* can be a pointer to a string, but it cannot be a string. > > I have a different reaction. I think string (or String) is a > fine type name for places where (char *) or (const char *) is > used to designate a null-terminated character array. As you of course know, a char* or const char* doesn't designate a string, it points to it. [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"