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: double free Date: Tue, 19 Jul 2016 11:42:29 -0700 Organization: None to speak of Lines: 38 Message-ID: References: <57837892.8808984@news.xs4all.nl> <481f30b4-acb3-4445-92b3-c403dc3e51f7@googlegroups.com> <8760sc2aiz.fsf@bsb.me.uk> <57856cf1.441531@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="7504"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vk9SXFXNFDRLNQIhjYWau" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:UKS0nzQFQ1thegTiJe56KySH2GE= sha1:19s687i4AJZHndTb8UQibYkM3uM= Xref: csiph.com comp.lang.c:90621 Malcolm McLean writes: > On Tuesday, July 19, 2016 at 5:23:43 PM UTC+1, Keith Thompson wrote: >> Malcolm McLean writes: >> [...] >> > You do however often have identifiers with names which are visually a >> > bit similar to sizeof. Eg size_t. >> >> I don't think anyone would confuse "sizeof" and "size_t". >> > It makes things a little bit harder to read, especially since the identifier > and keyword are likely to occur in proximity to each other. > > When writing novels, one bit of advice given to aspiring novelists is > often to use a different initial letter for each secondary character's > name. By a secondary character, I mean one who appears one or two > times, not just "woman selling oranges on barrow", but not the main > protagonists. > Otherwise experience has shown that readers tend to mix them up. That's fine for novels. I know what "sizeof" and "size_t" mean, because I know C, and they're fundamental concepts of the language. Their names start with "size" because, obviously, they both have to do with sizes. They're not names of fictional characters. (In a novel, I wouldn't be confused if a character named Hammer were using a hammer.) Have *you* ever confused them with each other? Do you have any evidence that anyone with any reasonable level of experience with C has actually confused them, or been troubled by their superficial similarity? (I imagine that someone with no C experience might have some initial difficulty.) -- 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"