Sujet : Re: on allowing "int a" definition everywhere
De : fir (at) *nospam* grunge.pl (fir)
Groupes : comp.lang.cDate : 27. Aug 2024, 12:56:47
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <22cd484ba1e5ea01f89a4997d16103e07d4069b0@i2pn2.org>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
fir wrote:
10' print((x 0)++)
>
where x 0 is initialisation of int x to zero
>
>
>
overally not bad, i could somewhat accept that loop
(yu wouldnt belive how hard is come to that syntax conclusions,
literally takes years, and not 5 years more like 15)
>
>
one of the worst things is find good function definition
but at least this 10' loop proves consciencity or
how it is caled (being short) its possible
right now i think if function maybe shouldnt note ret values in header (?)
this is by analogy for structure
s {} is structure and f {} is function
(its the same bcouse structure can have data fields and function can
have code elements - they bot may have mix
so if so if
s { float x,y,z } not return values so function maybe also should not
tyopu will nedd a keyword in function body though like res/result or return
s { result float x,y,z }
it could also define something like input maybe
s { input int a; result int b; } x;
x = 19; //comes into e
int y = x; //b comes here
or
s { input int a; b=0a; result int b; } x;
print( x(80)) //outs -80
i dont know if this is reasonable
also idea is to maybe turn "int" and "float " into runes
int should be "runic" I and float should be runic F
so
foo(int a, int b, float c) {}
can be written
foo aI bI cF {}
where I F are not normal but runic - this makes pleasant short and
clarifies things but im not sure if this is finally godd - but worth consideration