Deutsch   English   Français   Italiano  
<9831419dc5807b9119ecea93158c3983565bc022@i2pn2.org>

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: some new syntax ideas
Date: Sun, 25 Aug 2024 21:01:29 +0200
Organization: i2pn2 (i2pn.org)
Message-ID: <9831419dc5807b9119ecea93158c3983565bc022@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 25 Aug 2024 19:01:36 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="3876351"; 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
X-Spam-Checker-Version: SpamAssassin 4.0.0
Bytes: 2819
Lines: 88



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