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: absence of max Date: Tue, 29 Nov 2016 18:10:01 -0800 Organization: None to speak of Lines: 65 Message-ID: References: <0e1db67d-0ab8-4971-a319-8aa66a40b873@googlegroups.com> <436aadfe-20e5-4349-bdf4-9bac145b0d7e@googlegroups.com> <878ts2h5uk.fsf@bsb.me.uk> <8737i93kvj.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="3bc5dda710eeebf204839babe4155a1c"; logging-data="28564"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18cKZ8rpyUee9MN+zul/R4G" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:DD2VUH4JKW//Mp/oK9wDxB9MYu0= sha1:xKkptTFdP6EIIexHBmIJ+ptjd6Y= Xref: csiph.com comp.lang.c:97766 BartC writes: > On 29/11/2016 23:51, Ben Bacarisse wrote: >> BartC writes: >>> On 29/11/2016 11:40, Ben Bacarisse wrote: >>>> BartC writes: >> >>>>> The 'explicit casts' was for my benefit, as I use 'casts' to more >>>>> loosely mean a conversion that is either added internally by a >>>>> compiler, or that is applied in source code by the programmer. The >>>>> latter would be explicit. >>> >>>> Why not just call them conversions? >>> >>> 'Cast' is shorter than 'conversion' or 'coercion'? >> >> The question mark makes me think even you don't really consider this >> explanation adequate. If you have one you consider plausible, do post >> it; I'm genuinely curious. Expanding the narrow technical meaning of >> cast to cover all (or almost all) conversions is not uncommon and I'm >> not sure why this happens. > > Sorry I've lost the thread of this conversation. > > I wrote 'explicit cast' instead of 'cast'; so shoot me! Nobody is going to shoot you for using the phrase "explicit cast". Someone (RH, I think) did point out, quite correctly that the word "explicit" in that phrase is redundant (and yes, the standard uses it too). You could either acknowledge or ignore that point, and move on. > People here seem to forget that usenet articles are not program code > where everything has to be just so. They're in English. > > And even in English, these are not legal documents or reference manuals > or a precise set of instructions. It's informal. > > They also forget that not everyone is an expert who knows that 'cast' > has a very, very precise meaning - inside the C language reference. Not everyone does -- but surely you do. Which means *you* can choose to use the terms correctly, setting an example for others. The problem isn't the mostly harmlessly redundant phrase "explicit cast". The problem is that you wrote upthread (quoted at the top of this article) that you use the word "cast" to mean something other than what it actually means. As far as I can tell, you use the word "cast" to mean what is properly (in C) called a "conversion". That's not just harmlessly redundant, it's incorrect and misleading. As you've pointed out, a lot of other people make the same mistake -- but you know better. We all make mistakes; I've certainly made my share. But when someone points out that you're misusing a technical term, you don't admit it, and you give the impression (at least to me) that you're deliberately pretending not to understand things that you actualy do understand, presumably with the goal of making some point that still eludes me. A conversion may be implicit or explicit. An explicit conversion is called a cast, where a cast operator is written as a parenthesized type name. What is so hard about that? -- 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"