🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #63

Re: will it be optimized?

#63
From: fir
Date: Thu, 08 Oct 2026 19:47
115 lines
4793 bytes
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

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))


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: <11a8s0n$5k6m$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>

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: Thu, 8 Oct 2026 21:47:31 +0200
Organization: A noiseless patient Spider
Lines: 115
Message-ID: <11a8s0n$5k6m$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 08 Oct 2026 19:47:36 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="184534"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/RKuLNLtcCvl7xmfqOeYI3VTLE/AqmsEQ="; posting-host="0be8ec7f9e4f6b6e9583dc75ffe27f14"
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:t3snjQT5XibeK5Uq4kJ3MspmpRw= sha256:EJO+/KjLkcbR1CzvC1wLoJhlAYcnFqfturPo7UhVFOM=
	sha1:G6aG+dQ/bATpTulkDeMYj2jkEzw= sha256:syEDr8go77SX6IR8uKfFzT9hV4eOdP1Owk0yCKrrZGU=
In-Reply-To: <11a7dh0$3ifm4$1@dont-email.me>