some new syntax ideas

Liste des GroupesRevenir à l c 
Sujet : some new syntax ideas
De : fir (at) *nospam* grunge.pl (fir)
Groupes : comp.lang.c
Date : 25. Aug 2024, 21:01:29
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <9831419dc5807b9119ecea93158c3983565bc022@i2pn2.org>
User-Agent : Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
as its known i form time to time think of
inventing new more celaner (purer) syntax
for c (over c) and extended c (used to codename
it c2 now i think if codename it as "fi")
some ideas  (and obserwations)
I.
i noticed as structures in c are defined sorta such way
car { engine {int x; int y;}, wheel{int t; int w} [4] }
i mean structures contain substructures then it should
and substructure you dont define like
car { engine {x{int}, y{int}}, wheel{t{int}, w{int}} [4] }
so natural way of defining "int a" is
a {int}
its like structure a definition containing "int" structure
which is defined elsewhere
II.
i noticed bac then tehat initialisation and assigments
are two different things and idea is to use space as
definition "=" for initialisation (howewer those kind
of ideas of my change, so
a 10, b 10, c 20  //initialisations
is
int a = 10, b = 10, c = 20;
you can omit "int" for type as integer may be
assumed 10 and 20
flaots would be
x 10.0 , y 20.0 , z 30.0
(as to shorts and doubles i dont know)
III.
loops, the simplest loop form that coem to my mind is now
10' print("alala")
where 10' means 10 times, could also be variable
width 640
height 480
height' width' set_pixel()
as to use this indexes witch which teh loops iterate
(typical i, j) i dont know yet (could be something
like width.i height.i but for sure something other,
(its a question if this i needs separate name,
also it is soem question if such width should work
by value or by variable name
by value i mean
width 100
width' {width++}
would work 100 times amd width will end as 200
by 'variable' if would probably work more like
for(int i=0; i<width; i++) width++;
it is to infinity (probably by value is better)
eventually maybe also some like conitional loop
could also be added like
x<100 ' x=rand()%200;
which would work until 'by variable'
but many things need yet to be workd out

Date Sujet#  Auteur
25 Aug 24 o some new syntax ideas1fir

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal