Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail From: Bonita Montero Newsgroups: comp.lang.c Subject: Re: Top 10 most common hard skills listed on resumes... Date: Wed, 28 Aug 2024 13:32:29 +0200 Organization: A noiseless patient Spider Lines: 29 Message-ID: References: <20240825192810.0000672c@yahoo.com> <20240825220016.00002793@yahoo.com> <86bk1e4y7t.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 28 Aug 2024 13:32:28 +0200 (CEST) Injection-Info: raubtier-asyl.eternal-september.org; posting-host="533d64590f09fbd7a1b41b803c3065f2"; logging-data="3641528"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/M6HwoOokO6U0N8TXNTEiK2NqRIjNPwgE=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:VoFlzNoPsTKzjS1wX+0zeUZCbNQ= In-Reply-To: Content-Language: de-DE Bytes: 2886 Am 28.08.2024 um 13:09 schrieb Thiago Adams: > There is often confusion between abstraction and the syntax used to > achieve abstraction. Since there isn't a specific term for this, I'll > refer to it as "syntax for abstraction." The distinction is that with abstraction you have not much code but a big effect. Take f.e. a dynamic_cast<> which does a downcast. What the dynamic_cast<> does is simple, but compared to C it generates a lot of code. > In C, we have everything we need: "data" and "functions." In C you have five to ten times the code and mostly boilerplat-code to do the same thing. > For example, we can create an abstraction for a Matrix. Ultimately, the > Matrix abstraction is represented by struct and the operations on it are > functions: > > > struct matrix a = {}; > struct matrix b = {}; > ... > struct matrix c = matrix_mult(&a, &b); In C++23 you can have a matrix class and a multidimensional array -operator. This would result in the same code but much less effort.