Deutsch English Français Italiano |
<867ccmk2ku.fsf@linuxsc.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch <tr.17687@z991.linuxsc.com> Newsgroups: comp.lang.c Subject: Re: how cast works? Date: Sun, 11 Aug 2024 17:27:29 -0700 Organization: A noiseless patient Spider Lines: 17 Message-ID: <867ccmk2ku.fsf@linuxsc.com> References: <v8vlo9$2oc1v$1@dont-email.me> <slrnvb7kis.28a.dan@djph.net> <v929ah$3u7l7$1@dont-email.me> <87ttfu94yv.fsf@nosuchdomain.example.com> <v93a3t$6q7v$1@dont-email.me> <v93e2q$8put$1@dont-email.me> <87bk228uzg.fsf@nosuchdomain.example.com> <v94pji$m1ib$1@dont-email.me> <v95lb7$26koh$1@dont-email.me> <20240809142622.467@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Mon, 12 Aug 2024 02:27:30 +0200 (CEST) Injection-Info: dont-email.me; posting-host="f42e4005105099d89c60a754521770ce"; logging-data="3093877"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9TCXIt9hs0fdcNQoa8G7YNOd01N4i+/E=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:jvnokxuKj59DbbdFDYnPiXnLsc0= sha1:gucrjDffOJXgh1ivTcJjQNXFg/M= Bytes: 1885 Kaz Kylheku <643-408-1753@kylheku.com> writes: > In computer science, we refer to unsafe conversion as coercion. In most programming languages, "coercion" refers to any implicit conversion (perhaps requiring a change in type), regardless of whether the conversion is safe or is not. > THe cast notation is C's coercion operation. Absolutely not. "Coercion" usually means an implicitly caused conversion, following the term being introduced in Algol 68. A cast in C is exactly the opposite, always explicit. Disclaimer: the above comments based on cursory research to reinforce my memory of literature read years ago, and supported by Wikipedia.