Path: csiph.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: "The long goodbye to C" by Eric Raymond Date: Tue, 21 Nov 2017 12:33:55 -0800 Organization: None to speak of Lines: 28 Message-ID: References: <4ccde6fc-1ced-4182-b92d-202fdf9fa55c@googlegroups.com> <5a8ad8da-ed89-437f-bf55-a3d00e1f7be8@googlegroups.com> <2JnQB.42437$pG.17108@fx18.am4> <87fu99uimk.fsf@bsb.me.uk> <7b79f668-0f46-4bf7-a56d-62a59e1fcb8e@googlegroups.com> <913aca7f-3eff-474e-8955-1717d8a662ef@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="9437c726f685efabd2d584afa836bd7f"; logging-data="6946"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19so4eSEfVo2itJUP9c4y85" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:P/HjdmIF3X9cfwdf/xY7tKDpvf4= sha1:Wl04/Ixqg+fSqgun0ytG2edaN38= Xref: csiph.com comp.lang.c:123208 Thiago Adams writes: > On Monday, November 20, 2017 at 6:53:45 PM UTC-2, Ian Collins wrote: > ... >> In practice C++ does deal with it better. >> >> A good example is being able to add complex numbers as a library, not a >> language feature. C++ is designed to support user defined types as if >> there where built in to the language. A good chunk of the added >> complexity of C++ over C is there to support this. > > The difference in this case (complex numbers) is only syntax. > Don't you agree? [...] If I want to add quaternions in C++ and make them behave like C++'s existing complex numbers, I can create a cless, written in C++, that implements them. If I want to do the same thing in C, again making them behave like C's complex numbers, I have to hack a compiler. In practice I wouldn't bother; I'd implement (or find) a library that would implement all the operations as function calls. -- 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"