Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Bo Persson Newsgroups: comp.lang.c++ Subject: Re: ???Microsoft Azure CTO Mark Russinovich: C/C++ should be deprecated??? Date: Wed, 28 Sep 2022 10:43:13 +0200 Lines: 36 Message-ID: References: <20220922201519.3@kylheku.com> <20220927111408.394@kylheku.com> <7BIYK.100167$ocy7.42366@fx38.iad> <20220927165229.354@kylheku.com> <20220928012034.643@kylheku.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net npVmuAmnWHcrZQ5SBQbYVAwARcKgdIKsjXIACMBiTXKWcpBTq8 Cancel-Lock: sha1:MLO12qsOM42aGdgKp7ZmpHGPnIg= User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Content-Language: sv In-Reply-To: <20220928012034.643@kylheku.com> Xref: csiph.com comp.lang.c++:86669 On 2022-09-28 at 10:26, Kaz Kylheku wrote: > ["Followup-To:" header set to comp.lang.c.] > On 2022-09-28, James Kuyper wrote: >> On 9/27/22 20:03, Kaz Kylheku wrote: >>> On 2022-09-27, Scott Lurndal wrote: >> ... >>>> To be fair, the language allows you to explicity order them >>>> rather easily: >>>> >>>> temp1 = complex_expr; >>>> temp2 = another_complex_expr; >>>> temp3 = yet_another_complex_expr; >>>> >>>> make_object(temp1, temp2, temp3). >>> >>> That transformation is the job of the compiler, though. >>> >>> It's not practical to do this even in small programs, let alone >>> ones in which there are millions of function call expressions. >> >> You only do it when the order actually matters, not automatically for >> all function calls. > > OK; I still need the compiler to tell me where those places are; > I'm not looking at thousands of function calls to classify them > into whether they are stuffed with side effects whose order > matters or not. > So you write comlicated expressions with lots of side effects, without considering the order of those side effects. Doesn't sound like a good way to write code.