🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #74

Re: will it be optimized?

#74
From: fir
Date: Fri, 09 Oct 2026 08:56
133 lines
5307 bytes
fir pisze:
> fir pisze:
>> fir pisze:
>>> bart pisze:
>>>> On 07/10/2026 13:45, fir wrote:
>>>>
>>>>> really c should have that
>>>>> 1) references like in c++
>>>>> 2) adhoc damn enums /tags
>>>>> 3) builtin operators for float3 type
>>>>
>>>> That last is a very specific type for C.
>>>>
>>>> Why not go instead for a more general ability to be able to overload 
>>>> operators for user-defined types?
>>>>
>>>> You know, like C++.
>>>>
>>>> Or maybe you can just use C++ because it's right there, and you use 
>>>> a C++ compiler anyway.
>>>
>>>
>>> ye operator 'overloading' and references are good concepts.. here 
>>> above i  jut mentioned more modest changes that are needed (more 
>>> specifically i mentioned those who anoy me practically when i code 
>>> this rasterizer, and the lack of operators for float3 is heavy pain)
>>>
>>>
>>>
>>
>> aside the fact that syntax for this operators in c++ are not quite 
>> good imo (where builtin operators for float3 for sure would have 
>> proper syntax )
>>
>>
>> in fact i recently think that function definition syntax in c also may 
>> not be much good..if you got this what i call hipermodularity or 
>> fractal modularity i language then the function not "returns" value 
>> but "has a value"
>>
>> like
>>
>> foo()
>> {
>>    static float x;
>>    static float y;
>>    static float z;
>> }
>>
>> which you eventually oculd "cast" (or something other which waork 
>> close way) on different subsets (or maybe even supersets) of its value
>>
>>
>> printf ("%.1f ", (x) foo()); // call and take x
>>
>> (x,z) foo(); //call and take x y
>>
>>
>> (x,x,y) foo(); //call and take x x y
>>
>> (z,y,x) foo  //dont call just take z y x
>>
>>
>> clasic return hass to narrow usability probably and with this cast you 
>> could just fit result of one function to another
>>
>> like also
>>
>> boo ( (2,3 x,y, "sasaS") foo() )
>>
>> im not sure as to syntax though, as this should be done carefully and 
>> its not clear  now
>>
>>
> if returning is showed to be a bad concept (and it seems so)
> 
> and returning is replaced by function having a value just as structure 
> has a value then the syntax problem in simplest version is like that
> 
> if a is a structure (like float x,y,z) c got such things like a.x a.y 
> a.z but it has lack of something like a.xy a.yxz and so on and it is 
> needed and a question is how syntax to have to express it
> 

a.yxz

  cant stand but maybe there should be operator that groups things like
in structure

then a.x+y+z or a.x&z&y would mean return such fields

probably should coz to much of this all () could have problems

> casting is somewhat suitable for that
> 
> (x y)a
> 
> but im not sure as to this its kinda simple but not so easy to read 
> sometimes maybe and not sure if enough general
> 
> it is important becouse its quite fundamental operation (takin a field(s))
> around as same fundamental as assigning
> 
> 
> it also seems quite opposite as calling becouse
> if you call f(a b)  you liek "pass" a b into f and
> when you take things out (a b) f its like you pull things out of f
> 
> wonder if some take this syntax ('pushing' and 'pulling') and it
> it would work or just make syntax errors
> 
> (c d)f(a b)
> 
> is the above absolute clear you push a b into f and pull c d form it?
> now what if you use composing of such syntaxes
> 
> 
> (c d)f(( f k)g((v)a(3) b))
> 

this above is sorta unabiguos and not so hard to read but
seems just to much of this ()

> 
> im not sure
> 
> for sure classic a.b.c.d cant quite stay as its too poor it only like 
> has serial factor of pulling but not parralel factor and not denotes 
> pushing
> 
> 
> 
Technical Details
Message-ID: <11aaa7v$kga5$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11a1f4c$1g3sg$1@dont-email.me> <11a4qor$2kj95$1@dont-email.me> <11a50tk$2m3b3$2@dont-email.me> <11a5etj$2saav$1@dont-email.me> <11a5l3q$2urvl$1@dont-email.me> <11a63p7$34vce$1@dont-email.me> <11a7dh0$3ifm4$1@dont-email.me> <11a8s0n$5k6m$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: fir <profesor.fir@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: will it be optimized?
Date: Fri, 9 Oct 2026 10:56:31 +0200
Organization: A noiseless patient Spider
Lines: 133
Message-ID: <11aaa7v$kga5$1@dont-email.me>
References: <11a1f4c$1g3sg$1@dont-email.me> <11a4qor$2kj95$1@dont-email.me>
 <11a50tk$2m3b3$2@dont-email.me> <11a5etj$2saav$1@dont-email.me>
 <11a5l3q$2urvl$1@dont-email.me> <11a63p7$34vce$1@dont-email.me>
 <11a7dh0$3ifm4$1@dont-email.me> <11a8s0n$5k6m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 09 Oct 2026 08:56:32 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="672069"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18RgUDyrq+7pePcxx/lDimt8KhxVbvQScM="; posting-host="6bfced547515b2d762c33aed4cf2722f"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101
 Firefox/140.0 SeaMonkey/2.53.24
Cancel-Lock: sha1:uXEXgKlCmAMTa+SZQCfnUTgSYyc= sha256:TiGFoXMibfhaQFcFfvFyE164T9d/UdC0AMrB7/7Vzpk=
	sha1:zhqa9KAQelppC/IX1cobb8CeCmk= sha256:3TNvJ7K/nT3mGY4xmQIdsR7IorrP7tbqyNJjzML9zPs=
In-Reply-To: <11a8s0n$5k6m$1@dont-email.me>