Deutsch   English   Français   Italiano  
<672CEB27.7010907@grunge.pl>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: fir <fir@grunge.pl>
Newsgroups: comp.lang.c
Subject: Re: on named blocks concept
Date: Thu, 07 Nov 2024 17:30:31 +0100
Organization: i2pn2 (i2pn.org)
Message-ID: <672CEB27.7010907@grunge.pl>
References: <4b9a47d628677882c26b2518a78571043ef1bdb9@i2pn2.org> <vggdhl$27v1j$1@dont-email.me> <vggecf$27v1j$2@dont-email.me> <672BC788.6030100@grunge.pl> <vgi5fm$2k8kb$1@raubtier-asyl.eternal-september.org> <672CE2D9.1070206@grunge.pl>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: i2pn2.org;
	logging-data="1392947"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="+ydHcGjgSeBt3Wz3WTfKefUptpAWaXduqfw5xdfsuS0";
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
To: Bonita Montero <Bonita.Montero@gmail.com>
X-Spam-Checker-Version: SpamAssassin 4.0.0
In-Reply-To: <672CE2D9.1070206@grunge.pl>
Bytes: 2103
Lines: 41

fir wrote:
> Bonita Montero wrote:
>> Am 06.11.2024 um 20:46 schrieb fir:
>>
>>> a {}
>>> b{ }
>>> c{}
>>>
>>> int x = a*b+c;
>>>
>>> where a,b,c are blocks of code (though here it would probably mean
>>> "run a" get value and mul by "run b" take value , tun c and add
>>
>> Use C++ and lambdas.
>
> c++ has so many structural errors it makes it sh*t
> (overaly all c++ is structural errors .. prbably one and only
> thing interesting in c++ is operator overloading but it also is badly
> done ofc)
>

besides you could do more than this lambda does , i guess
(i dont quite remember what this lambda is)

like some can define operators on this blocks for more than arithmetic 
on return values

like this "inject " a<-b

a is called and it cals b from inside

b {beep();}

a(block f) {
   for(int i=0; i<10; i++) f()
}

or something more complex in this spirit (i dont know what hoveve)

maybe also thiose blocks simply could be used to allow code be shorter, 
i dont know