🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1296

Re: p = {1,0,0}

#1296
From: fir
Date: Tue, 03 Nov 2026 14:54
89 lines
4705 bytes
bartc pisze:
> On 03/11/2026 12:19, fir wrote:
>> bartc pisze:
> 
>>>>>>> On 01/11/2026 13:32, fir wrote:
> 
>>>>>>>> the fact stat some cannot assign a structure like
>>>>>>>> this
>>>>>>>>
>>>>>>>> s = {x,y};
>>> (It seems to work in my language, provided the expression isn't 
>>> 'open'. So 'a := (x, y)' will work, as the LHS helps refine the type, 
>>> but not 'print (x, y)' because the types have not been pinned down.)
>>>
>>>
>>
>> [legal note:
>> imo if you take some ideas from me you should credit it (its like "i 
>> seen it from the fir "or "as fir said/showed") ..im here speaking 
>> generally becouse (i cant find as a copyright police what people took 
>> for me and what by the chance no)
> 
> You think I stole this 'feature' from your recent post?
> 
> In the early 1990s I could write code like this in my scripting language:
> 
>      p := (100, 200, 300)
>      q := (20, 30, 40)
>      m := (p + q) / 2
> 
>      println m           # (60.00, 115.00, 170.00)
> 
> It was a 3D graphics application.
> 
> In my systems language, it worked like this, and from the 1980s:
> 
>     record point =
>         int x, y
>     end
> 
>     point p = (100, 200)         # RHS must be compile-time expr
> 
> But general assignments, outside of initialisation and with runtime 
> expressions, were not implemented until within the last decade (I can't 
> remember exactly as I rarely use the feature, but it was more than two 
> days ago). That means being able to do this:
> 
>     p := (x+1, y)
> 
> Such an ability is a natural consequence of the syntax which has always 
> been able to express it. It's just a question of (1) whether it has 
> useful and desirable semantics; (2) someone has bothered to implement it.
> 
> So it has been a thing since the 1980s, and I eventually got around to 
> it some decades later.
> 
> Notice also that it uses round brackets and not braces.
> 
> 
>> i know people are not much honest
>> anyway..yet this above is quite not so totally unusual observation
>> (though many undable to dat obeservations) but speaking generally]
> 
> Yeah, nobody has thought of having a constructor term like (a, b, c) in 
> a PL before you brought it up! Not even in Lisp.
> 
> Anyway, DB mentions that C++ has it in the form of {a, b, c}.
> 
>> same way {1,2,"assas", 8.9} is value of anonymous structure of type 
>> int int char* double (or eventually float)
> 
>> no any problem with that imo
> 
> How do you access the elements?
> 
so if youre talkin about tuples in python its not that think im talkin 
about..
i overally was speaking more general here

here for example idea to use a = {2,3} (like it is in normal c )
its quite a public domain and i wouldnt say i want to be credited as an 
owner of this idea, but such things generally should be credited if
they are follows to some observations.. so im not talking about "owning"
but much more slight thing of bein credited in some more like "paper" 
way of mentioning something

ho do you acces the elements? you dont you assign it to some variable 
then acces the variable..
Technical Details
Message-ID: <11ccsj0$3ri0u$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: <11c7f1j$20b9h$1@dont-email.me> <11c7fj6$20gab$1@dont-email.me> <11cae5m$318tq$1@dont-email.me> <11calrt$34gq3$1@dont-email.me> <11carqs$36m0o$1@dont-email.me> <11cb4hs$3a13l$1@dont-email.me> <11ccjfo$3nvjc$1@dont-email.me> <11ccpr5$3qfhd$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: p = {1,0,0}
Date: Tue, 3 Nov 2026 15:54:24 +0100
Organization: A noiseless patient Spider
Lines: 89
Message-ID: <11ccsj0$3ri0u$1@dont-email.me>
References: <11c7f1j$20b9h$1@dont-email.me> <11c7fj6$20gab$1@dont-email.me>
 <11cae5m$318tq$1@dont-email.me> <11calrt$34gq3$1@dont-email.me>
 <11carqs$36m0o$1@dont-email.me> <11cb4hs$3a13l$1@dont-email.me>
 <11ccjfo$3nvjc$1@dont-email.me> <11ccpr5$3qfhd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 03 Nov 2026 14:54:24 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="4048926"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+GTnh3tZo+X1XyTmEMcvB7ulqtyqSvGd8="; posting-host="74e0b903fc41719bd550775fdb1cba7e"
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:X79H2tZmcnFgIsDUv9GaEdXJr2c= sha256:k1nP26RtFvnTR7udzUat0pqaeFQ0cCp1P6LtCU8LPFs=
	sha1:QeUIp4StS0Ek1Sa4csh0zr1GpM8= sha256:2YKzj/9M8fQZjudxeSAqBBFJgb9/s8bDgE92SfksVXQ=
In-Reply-To: <11ccpr5$3qfhd$1@dont-email.me>