it is maybe banal but sometimes banal remarks also maybe should be
stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied)
with this {0,0,1} at least c has a basic of ths vector/tupple support
and this 'native' support is quite standable..so its very weird it is 'blocked' from usage
On 01/11/2026 13:32, fir wrote:
it is maybe banal but sometimes banal remarks also maybe should be
stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied)
with this {0,0,1} at least c has a basic of ths vector/tupple support
and this 'native' support is quite standable..so its very weird it is
'blocked' from usage
#include <stdio.h>this (T) is rather silly here - i mean its ok if you cast something but
typedef struct {int x,y;} T;
int main(void) {
˙˙˙ T s;
˙˙˙ s = (T){10,20};
}
bartc pisze:
On 01/11/2026 13:32, fir wrote:this (T) is rather silly here - i mean its ok if you cast something but
it is maybe banal but sometimes banal remarks also maybe should be
stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied)
with this {0,0,1} at least c has a basic of ths vector/tupple support
and this 'native' support is quite standable..so its very weird it is
'blocked' from usage
#include <stdio.h>
typedef struct {int x,y;} T;
int main(void) {
˙˙˙˙ T s;
˙˙˙˙ s = (T){10,20};
}
if no its like
int a = (int) 20;
fir pisze:
bartc pisze:
On 01/11/2026 13:32, fir wrote:this (T) is rather silly here - i mean its ok if you cast something
it is maybe banal but sometimes banal remarks also maybe should be
stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied)
with this {0,0,1} at least c has a basic of ths vector/tupple support
and this 'native' support is quite standable..so its very weird it
is 'blocked' from usage
#include <stdio.h>
typedef struct {int x,y;} T;
int main(void) {
˙˙˙˙ T s;
˙˙˙˙ s = (T){10,20};
}
but if no its like
int a = (int) 20;
logically
x = {2,3};
as an assigment is kinda ok
if some told some need to have a different syntax for initialisation
then in fact
x = {2,3};
more fit to assigment than initialisation and some could tke something
other to denote nitialisation
On 01/11/2026 13:32, fir wrote:
it is maybe banal but sometimes banal remarks also maybe should be
stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied)
with this {0,0,1} at least c has a basic of ths vector/tupple support
and this 'native' support is quite standable..so its very weird it is
'blocked' from usage
#include <stdio.h>
typedef struct {int x,y;} T;
int main(void) {
˙˙˙ T s;
˙˙˙ s = (T){10,20};
}
On 01/11/2026 14:41, bartc wrote:
On 01/11/2026 13:32, fir wrote:
it is maybe banal but sometimes banal remarks also maybe should be
stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied)
with this {0,0,1} at least c has a basic of ths vector/tupple support
and this 'native' support is quite standable..so its very weird it is
'blocked' from usage
#include <stdio.h>
typedef struct {int x,y;} T;
int main(void) {
˙˙˙˙ T s;
˙˙˙˙ s = (T){10,20};
}
As often seems to be the case, things Fir wants are already available in C++.
In C, you need to give a type to "{ 10, 20 }" - as you did here, making
it into a compound literal.˙ The expression "{ 10, 20 }" on its own
cannot be used for assignment to "s" because the type of an expression
must be determined from the expression alone - not from what you are assigning it to.
In C++, "s = { 10, 20 };" is valid because "{ 10, 20 }" is treated asIn the language or compiler? Because machinery can be added to C too.
type std::initializer_list<int> (the "int" part is automatically
inferred).˙ Making this work involves quite a bit of additional C++ machinery that does not exist in C.
On 02/11/2026 16:36, David Brown wrote:
On 01/11/2026 14:41, bartc wrote:
On 01/11/2026 13:32, fir wrote:
it is maybe banal but sometimes banal remarks also maybe should be
stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied)
with this {0,0,1} at least c has a basic of ths vector/tupple support
and this 'native' support is quite standable..so its very weird it
is 'blocked' from usage
#include <stdio.h>
typedef struct {int x,y;} T;
int main(void) {
˙˙˙˙ T s;
˙˙˙˙ s = (T){10,20};
}
As often seems to be the case, things Fir wants are already available
in C++.
In C, you need to give a type to "{ 10, 20 }" - as you did here,
making it into a compound literal.˙ The expression "{ 10, 20 }" on its
own cannot be used for assignment to "s" because the type of an
expression must be determined from the expression alone - not from
what you are assigning it to.
I think this has been discussed recently but I can't remember the
arguments.
But people can write:
˙˙ x = 0;
and the exact type of '0' can be determined from the type of 'x', so I
don't see much difference.
Plus it doesn't see to be a problem here:
˙ T s = {10, 20};
What determines the type of {10, 20} in this case?
In the language or compiler? Because machinery can be added to C too.
In C++, "s = { 10, 20 };" is valid because "{ 10, 20 }" is treated as
type std::initializer_list<int> (the "int" part is automatically
inferred).˙ Making this work involves quite a bit of additional C++
machinery that does not exist in C.
bartc pisze:
On 02/11/2026 16:36, David Brown wrote:you once asked if i want some of what i talk someone should implement
On 01/11/2026 14:41, bartc wrote:
On 01/11/2026 13:32, fir wrote:
it is maybe banal but sometimes banal remarks also maybe should be
stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied) >>>>>
with this {0,0,1} at least c has a basic of ths vector/tupple support >>>>> and this 'native' support is quite standable..so its very weird it
is 'blocked' from usage
#include <stdio.h>
typedef struct {int x,y;} T;
int main(void) {
˙˙˙˙ T s;
˙˙˙˙ s = (T){10,20};
}
As often seems to be the case, things Fir wants are already available
in C++.
In C, you need to give a type to "{ 10, 20 }" - as you did here,
making it into a compound literal.˙ The expression "{ 10, 20 }" on
its own cannot be used for assignment to "s" because the type of an
expression must be determined from the expression alone - not from
what you are assigning it to.
I think this has been discussed recently but I can't remember the
arguments.
But people can write:
˙˙˙ x = 0;
and the exact type of '0' can be determined from the type of 'x', so I
don't see much difference.
Plus it doesn't see to be a problem here:
˙˙ T s = {10, 20};
What determines the type of {10, 20} in this case?
In the language or compiler? Because machinery can be added to C too.
In C++, "s = { 10, 20 };" is valid because "{ 10, 20 }" is treated as
type std::initializer_list<int> (the "int" part is automatically
inferred).˙ Making this work involves quite a bit of additional C++
machinery that does not exist in C.
etc...
in fact i dont care those are some observations, and i may wait
implement it myself but also someone (espe like c comitee) could
implement it imo (some of it those closer to c)
but it geerally seems this comitee is don bad work
ythse some basic changes and obvious exchanges like hera baove
or this that 'bhdbdh' would work they should do
i think what not breaks compatibility and what is really sane and not
rises special objections they should do
On 02/11/2026 16:36, David Brown wrote:
On 01/11/2026 14:41, bartc wrote:
On 01/11/2026 13:32, fir wrote:
it is maybe banal but sometimes banal remarks also maybe should be
stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied)
with this {0,0,1} at least c has a basic of ths vector/tupple support
and this 'native' support is quite standable..so its very weird it
is 'blocked' from usage
#include <stdio.h>
typedef struct {int x,y;} T;
int main(void) {
˙˙˙˙ T s;
˙˙˙˙ s = (T){10,20};
}
As often seems to be the case, things Fir wants are already available
in C++.
In C, you need to give a type to "{ 10, 20 }" - as you did here,
making it into a compound literal.˙ The expression "{ 10, 20 }" on its
own cannot be used for assignment to "s" because the type of an
expression must be determined from the expression alone - not from
what you are assigning it to.
I think this has been discussed recently but I can't remember the
arguments.
But people can write:
˙˙ x = 0;
and the exact type of '0' can be determined from the type of 'x', so I
don't see much difference.
Plus it doesn't see to be a problem here:
˙ T s = {10, 20};
What determines the type of {10, 20} in this case?
In the language or compiler? Because machinery can be added to C too.
In C++, "s = { 10, 20 };" is valid because "{ 10, 20 }" is treated as
type std::initializer_list<int> (the "int" part is automatically
inferred).˙ Making this work involves quite a bit of additional C++
machinery that does not exist in C.
[...] - just use C++.
[...]
In C, you need to give a type to "{ 10, 20 }" - as you did here,
making it into a compound literal. The expression "{ 10, 20 }" on its
own cannot be used for assignment to "s" because the type of an
expression must be determined from the expression alone - not from
what you are assigning it to.
On 02/11/2026 19:47, bartc wrote:
On 02/11/2026 16:36, David Brown wrote:
On 01/11/2026 14:41, bartc wrote:
On 01/11/2026 13:32, fir wrote:
it is maybe banal but sometimes banal remarks also maybe should be
stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied) >>>>>
with this {0,0,1} at least c has a basic of ths vector/tupple support >>>>> and this 'native' support is quite standable..so its very weird it
is 'blocked' from usage
#include <stdio.h>
typedef struct {int x,y;} T;
int main(void) {
˙˙˙˙ T s;
˙˙˙˙ s = (T){10,20};
}
As often seems to be the case, things Fir wants are already available
in C++.
In C, you need to give a type to "{ 10, 20 }" - as you did here,
making it into a compound literal.˙ The expression "{ 10, 20 }" on
its own cannot be used for assignment to "s" because the type of an
expression must be determined from the expression alone - not from
what you are assigning it to.
I think this has been discussed recently but I can't remember the
arguments.
But people can write:
˙˙˙ x = 0;
and the exact type of '0' can be determined from the type of 'x', so I
don't see much difference.
No, 0 is of type "int".˙ As an integer constant expression with value 0,
it can be /converted/ to any pointer type, giving a null pointer
constant.˙ It can also be converted to a float, or other arithmetic
type.˙ But as it stands, "0" has a fixed type - "int".
Plus it doesn't see to be a problem here:
˙˙ T s = {10, 20};
What determines the type of {10, 20} in this case?
That is initialisation, which is a different matter.˙ Critically, it is
a declaration and not an expression - it does not produce a value that
can itself be used.
(I'd be happy if assignment were a particular kind of statement, rather
than an expression.˙ I'd be happy if "s = { 10, 20 };" worked in C.˙ It doesn't work in C, however - this is one of many reasons why I usually
work in C++ rather than C.)
In the language or compiler? Because machinery can be added to C too.
In C++, "s = { 10, 20 };" is valid because "{ 10, 20 }" is treated as
type std::initializer_list<int> (the "int" part is automatically
inferred).˙ Making this work involves quite a bit of additional C++
machinery that does not exist in C.
std::initializer_list is a template.˙ Making templates work in C would require so many changes that it would be pointless - just use C++.
Maybe the assignment could be made to work in other ways that could be
more feasible to add to C.˙ It's not something I have thought through in detail.
On 02/11/2026 20:29, David Brown wrote:
On 02/11/2026 19:47, bartc wrote:
On 02/11/2026 16:36, David Brown wrote:
On 01/11/2026 14:41, bartc wrote:
On 01/11/2026 13:32, fir wrote:
it is maybe banal but sometimes banal remarks also maybe should be >>>>>> stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied) >>>>>>
with this {0,0,1} at least c has a basic of ths vector/tupple support >>>>>> and this 'native' support is quite standable..so its very weird it >>>>>> is 'blocked' from usage
#include <stdio.h>
typedef struct {int x,y;} T;
int main(void) {
˙˙˙˙ T s;
˙˙˙˙ s = (T){10,20};
}
As often seems to be the case, things Fir wants are already
available in C++.
In C, you need to give a type to "{ 10, 20 }" - as you did here,
making it into a compound literal.˙ The expression "{ 10, 20 }" on
its own cannot be used for assignment to "s" because the type of an
expression must be determined from the expression alone - not from
what you are assigning it to.
I think this has been discussed recently but I can't remember the
arguments.
But people can write:
˙˙˙ x = 0;
and the exact type of '0' can be determined from the type of 'x', so
I don't see much difference.
No, 0 is of type "int".˙ As an integer constant expression with value
0, it can be /converted/ to any pointer type, giving a null pointer
constant.˙ It can also be converted to a float, or other arithmetic
type.˙ But as it stands, "0" has a fixed type - "int".
Same thing. Here there is a tuple of two ints. (The syntax might be problematical in C outside of initialisation or following a cast.)
Such tuples can be used without having to expose them in the language.
They already occur here: (T){10, 20}.
Plus it doesn't see to be a problem here:
˙˙ T s = {10, 20};
What determines the type of {10, 20} in this case?
That is initialisation, which is a different matter.˙ Critically, it
is a declaration and not an expression - it does not produce a value
that can itself be used.
But it manages to figure out the types. (Even if it is not fussy about nested {} grouping.)
(I'd be happy if assignment were a particular kind of statement,
rather than an expression.˙ I'd be happy if "s = { 10, 20 };" worked
in C.˙ It doesn't work in C, however - this is one of many reasons why
I usually work in C++ rather than C.)
OK. Another reason why such things are not a priority in C. You either
use workarounds with macros or switch to a sister language which has
evolved much more dramatically.
In the language or compiler? Because machinery can be added to C too.
In C++, "s = { 10, 20 };" is valid because "{ 10, 20 }" is treated
as type std::initializer_list<int> (the "int" part is automatically
inferred).˙ Making this work involves quite a bit of additional C++
machinery that does not exist in C.
std::initializer_list is a template.˙ Making templates work in C would
require so many changes that it would be pointless - just use C++.
Maybe the assignment could be made to work in other ways that could be
more feasible to add to C.˙ It's not something I have thought through
in detail.
On 02/11/2026 20:29, David Brown wrote:
On 02/11/2026 19:47, bartc wrote:
On 02/11/2026 16:36, David Brown wrote:
On 01/11/2026 14:41, bartc wrote:
On 01/11/2026 13:32, fir wrote:
it is maybe banal but sometimes banal remarks also maybe should be >>>>>> stated as i dont remember if i even was posting on that
the fact stat some cannot assign a structure like
this
s = {x,y};
seems rather silly (especially as structures can be assigned/copied) >>>>>>
with this {0,0,1} at least c has a basic of ths vector/tupple support >>>>>> and this 'native' support is quite standable..so its very weird it >>>>>> is 'blocked' from usage
#include <stdio.h>
typedef struct {int x,y;} T;
int main(void) {
˙˙˙˙ T s;
˙˙˙˙ s = (T){10,20};
}
As often seems to be the case, things Fir wants are already
available in C++.
In C, you need to give a type to "{ 10, 20 }" - as you did here,
making it into a compound literal.˙ The expression "{ 10, 20 }" on
its own cannot be used for assignment to "s" because the type of an
expression must be determined from the expression alone - not from
what you are assigning it to.
I think this has been discussed recently but I can't remember the
arguments.
But people can write:
˙˙˙ x = 0;
and the exact type of '0' can be determined from the type of 'x', so
I don't see much difference.
No, 0 is of type "int".˙ As an integer constant expression with value
0, it can be /converted/ to any pointer type, giving a null pointer
constant.˙ It can also be converted to a float, or other arithmetic
type.˙ But as it stands, "0" has a fixed type - "int".
Same thing. Here there is a tuple of two ints. (The syntax might be problematical in C outside of initialisation or following a cast.)
Such tuples can be used without having to expose them in the language.
They already occur here: (T){10, 20}.
Plus it doesn't see to be a problem here:
˙˙ T s = {10, 20};
What determines the type of {10, 20} in this case?
That is initialisation, which is a different matter.˙ Critically, it
is a declaration and not an expression - it does not produce a value
that can itself be used.
But it manages to figure out the types. (Even if it is not fussy about nested {} grouping.)
(I'd be happy if assignment were a particular kind of statement,
rather than an expression.˙ I'd be happy if "s = { 10, 20 };" worked
in C.˙ It doesn't work in C, however - this is one of many reasons why
I usually work in C++ rather than C.)
OK. Another reason why such things are not a priority in C. You either
use workarounds with macros or switch to a sister language which has
evolved much more dramatically.
In the language or compiler? Because machinery can be added to C too.
In C++, "s = { 10, 20 };" is valid because "{ 10, 20 }" is treated
as type std::initializer_list<int> (the "int" part is automatically
inferred).˙ Making this work involves quite a bit of additional C++
machinery that does not exist in C.
std::initializer_list is a template.˙ Making templates work in C would
require so many changes that it would be pointless - just use C++.
Maybe the assignment could be made to work in other ways that could be
more feasible to add to C.˙ It's not something I have thought through
in detail.
(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.)
David Brown <david.brown@hesbynett.no> writes:
[...]
In C, you need to give a type to "{ 10, 20 }" - as you did here,
making it into a compound literal. The expression "{ 10, 20 }" on its
own cannot be used for assignment to "s" because the type of an
expression must be determined from the expression alone - not from
what you are assigning it to.
In fact `{ 10, 20 }` is not an expression at all. It's a valid
initializer and it can be part of an expression (a compound literal).
(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.)
zoo({x,y,} foo({2,3,4}))
foo terurns int-int-int but zoo takes only 2 ints
bartc pisze:
On 01/11/2026 13:32, fir wrote:
(It seems to work in my language, provided the expression isn'tthe fact stat some cannot assign a structure like
this
s = {x,y};
'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)
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]
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
On 03/11/2026 12:19, fir wrote:
bartc pisze:
On 01/11/2026 13:32, fir wrote:
(It seems to work in my language, provided the expression isn'tthe fact stat some cannot assign a structure like
this
s = {x,y};
'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?
On 03/11/2026 12:19, fir wrote:
bartc pisze:
On 01/11/2026 13:32, fir wrote:
(It seems to work in my language, provided the expression isn'tthe fact stat some cannot assign a structure like
this
s = {x,y};
'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?
fir pisze:
zoo({x,y,} foo({2,3,4}))
foo terurns int-int-int but zoo takes only 2 ints
it shows some interesting thing like
x = foo() this equal could be said is wrong (becouse it is not
quite assigment in general its like adressing x more than assigning)
becouse here it could be
{x} foo()
or
˙foo(){x}
(it also may be kipped as anonymous as it is often skipped )
its also more compatible as i asid in returning more values
buck then i was thinking about shipping {} and use this pure form
like x y foo a b c but it seem harder to think so for some stage this
very classic {a,b,c} is quite good to do some insight using it
fir pisze:
fir pisze:
zoo({x,y,} foo({2,3,4}))
foo terurns int-int-int but zoo takes only 2 ints
it shows some interesting thing like
x = foo() this equal could be said is wrong (becouse it is not
quite assigment in general its like adressing x more than assigning)
becouse here it could be
{x} foo()
or
˙˙foo(){x}
i dont know it this above is in fact not more basic than this leftside one
generally some coud say that calling coud work both left and right
then () would be operator of taking ad {} of returning
(3,4) add˙ {c} //add 3 yo 4 and put it to c
or for both sides
(2) add (3) {c}
i dont know if it has sense but something could be searched here
(as to potential usability)
(it also may be kipped as anonymous as it is often skipped )
its also more compatible as i asid in returning more values
buck then i was thinking about shipping {} and use this pure form
like x y foo a b c but it seem harder to think so for some stage this
very classic {a,b,c} is quite good to do some insight using it
fir pisze:
fir pisze:
fir pisze:
zoo({x,y,} foo({2,3,4}))
foo terurns int-int-int but zoo takes only 2 ints
it shows some interesting thing like
x = foo() this equal could be said is wrong (becouse it is not
quite assigment in general its like adressing x more than assigning)
becouse here it could be
{x} foo()
or
˙˙foo(){x}
i dont know it this above is in fact not more basic than this leftside
one
generally some coud say that calling coud work both left and right
then () would be operator of taking ad {} of returning
(3,4) add˙ {c} //add 3 yo 4 and put it to c
or for both sides
(2) add (3) {c}
a sto "pure form" (or normally speaking pure form) overally it seems
that those () {} can be ommited in call when function has very hardcoded signature, so eventually you may add some in definition to hardcode such signature
(int a) (int b) foo [int x]
{
˙˙ x = a + b
}
than
2 3 add b
is know what mean
maybe this pure form is in fact better becouse its clarity is appealing
i dont know if it has sense but something could be searched here
(as to potential usability)
(it also may be kipped as anonymous as it is often skipped )
its also more compatible as i asid in returning more values
buck then i was thinking about shipping {} and use this pure form
like x y foo a b c but it seem harder to think so for some stage this
very classic {a,b,c} is quite good to do some insight using it
On 03/11/2026 12:19, fir wrote:
bartc pisze:
On 01/11/2026 13:32, fir wrote:
(It seems to work in my language, provided the expression isn'tthe fact stat some cannot assign a structure like
this
s = {x,y};
'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?
note i notice you are like halfly wanted to be foaming foam man
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
fir pisze:
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
my hiper modular thinking i was doin back then suggest that
both forms i mean
rand {int value = rand()}
rand [int value] {value = rand()}
whould be probably present as modules just have its options to be
written and those are two realisations of those options
first has just ownning his ovn ram and second not (bein ram empty)
now what has {} to do with it?
hela know
maybe it should work like a cast orr just be and option of marking
output values?
{X} rand
rand {x}
i dont know yet
fir pisze:
fir pisze:
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
my hiper modular thinking i was doin back then suggest that
both forms i mean
rand {int value = rand()}
rand [int value] {value = rand()}
there is also option
int rand { rand = rand()}
You're trying to create a language syntax like monkeys typing at randomwhould be probably present as modules just have its options to be
written and those are two realisations of those options
first has just ownning his ovn ram and second not (bein ram empty)
now what has {} to do with it?
hela know
maybe it should work like a cast orr just be and option of marking
output values?
{X} rand
rand {x}
i dont know yet
On 03/11/2026 16:06, fir wrote:
fir pisze:
fir pisze:
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
my hiper modular thinking i was doin back then suggest that
both forms i mean
rand {int value = rand()}
rand [int value] {value = rand()}
there is also option
int rand { rand = rand()}
Which means...?
You're trying to create a language syntax like monkeys typing at randomwhould be probably present as modules just have its options to be
written and those are two realisations of those options
first has just ownning his ovn ram and second not (bein ram empty)
now what has {} to do with it?
hela know
maybe it should work like a cast orr just be and option of marking
output values?
{X} rand
rand {x}
i dont know yet
in the hope they'll produce some Shakespeare.
What the hell are you doing spouting all this nonsense in such a forum
as this anyway?
Work it out privately and when you have something worth discussing then maybe post to a relevant group, if sticking with usenet.
But I'd suggest not bothering with comp.lang.c unless your ideas are anywhere in this ballpark. Currently your musings are a million miles away.
bartc pisze:
On 03/11/2026 16:06, fir wrote:
fir pisze:
fir pisze:
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
my hiper modular thinking i was doin back then suggest that
both forms i mean
rand {int value = rand()}
rand [int value] {value = rand()}
there is also option
int rand { rand = rand()}
Which means...?
in the hipermodular approach (which is proper stright approach, not some fancy imo) functions have properties of structures and structures have properties of functions
so if you have struct rand {int value} you may acces the rand.value
but also instead of struct rand you could have just rand (int rand)
so you may acces rand
so here
rand {int value = rand()}
some may use int x = rand();˙ rand.value++; etc
with this syntax
int rand {rand = rand()}
you may use int x = rand(); rand++;
just ommiting this field named value but accesing this entity rand stright
You're trying to create a language syntax like monkeys typing atwhould be probably present as modules just have its options to be
written and those are two realisations of those options
first has just ownning his ovn ram and second not (bein ram empty)
now what has {} to do with it?
hela know
maybe it should work like a cast orr just be and option of marking
output values?
{X} rand
rand {x}
i dont know yet
random in the hope they'll produce some Shakespeare.
What the hell are you doing spouting all this nonsense in such a forum
as this anyway?
Work it out privately and when you have something worth discussing
then maybe post to a relevant group, if sticking with usenet.
But I'd suggest not bothering with comp.lang.c unless your ideas are
anywhere in this ballpark. Currently your musings are a million miles
away.
it is very worth discussing its just above your level..so i csuggest get
to work and learn up
fir pisze:
bartc pisze:instead of foaming...
On 03/11/2026 16:06, fir wrote:
fir pisze:
fir pisze:
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
my hiper modular thinking i was doin back then suggest that
both forms i mean
rand {int value = rand()}
rand [int value] {value = rand()}
there is also option
int rand { rand = rand()}
Which means...?
in the hipermodular approach (which is proper stright approach, not
some fancy imo) functions have properties of structures and structures
have properties of functions
so if you have struct rand {int value} you may acces the rand.value
but also instead of struct rand you could have just rand (int rand)
so you may acces rand
so here
rand {int value = rand()}
some may use int x = rand();˙ rand.value++; etc
with this syntax
int rand {rand = rand()}
you may use int x = rand(); rand++;
just ommiting this field named value but accesing this entity rand
stright
You're trying to create a language syntax like monkeys typing atwhould be probably present as modules just have its options to be
written and those are two realisations of those options
first has just ownning his ovn ram and second not (bein ram empty)
now what has {} to do with it?
hela know
maybe it should work like a cast orr just be and option of marking
output values?
{X} rand
rand {x}
i dont know yet
random in the hope they'll produce some Shakespeare.
What the hell are you doing spouting all this nonsense in such a
forum as this anyway?
Work it out privately and when you have something worth discussing
then maybe post to a relevant group, if sticking with usenet.
But I'd suggest not bothering with comp.lang.c unless your ideas are
anywhere in this ballpark. Currently your musings are a million miles
away.
it is very worth discussing its just above your level..so i csuggest
get to work and learn up
bartc pisze:
On 03/11/2026 16:06, fir wrote:
fir pisze:
fir pisze:
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
my hiper modular thinking i was doin back then suggest that
both forms i mean
rand {int value = rand()}
rand [int value] {value = rand()}
there is also option
int rand { rand = rand()}
Which means...?
in the hipermodular approach (which is proper stright approach, not some fancy imo) functions have properties of structures and structures have properties of functions
so if you have struct rand {int value} you may acces the rand.value
but also instead of struct rand you could have just rand (int rand)
so you may acces rand
so here
rand {int value = rand()}
some may use int x = rand();˙ rand.value++; etc
with this syntax
int rand {rand = rand()}
you may use int x = rand(); rand++;
just ommiting this field named value but accesing this entity rand stright
You're trying to create a language syntax like monkeys typing atwhould be probably present as modules just have its options to be
written and those are two realisations of those options
first has just ownning his ovn ram and second not (bein ram empty)
now what has {} to do with it?
hela know
maybe it should work like a cast orr just be and option of marking
output values?
{X} rand
rand {x}
i dont know yet
random in the hope they'll produce some Shakespeare.
What the hell are you doing spouting all this nonsense in such a forum
as this anyway?
Work it out privately and when you have something worth discussing
then maybe post to a relevant group, if sticking with usenet.
But I'd suggest not bothering with comp.lang.c unless your ideas are
anywhere in this ballpark. Currently your musings are a million miles
away.
it is very worth discussing its just above your level..so i csuggest get
to work and learn up
fir pisze:
bartc pisze:overally i remember i was not quite sure how to define operators in c
On 03/11/2026 16:06, fir wrote:
fir pisze:
fir pisze:
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
my hiper modular thinking i was doin back then suggest that
both forms i mean
rand {int value = rand()}
rand [int value] {value = rand()}
there is also option
int rand { rand = rand()}
Which means...?
in the hipermodular approach (which is proper stright approach, not
some fancy imo) functions have properties of structures and structures
have properties of functions
so if you have struct rand {int value} you may acces the rand.value
but also instead of struct rand you could have just rand (int rand)
so you may acces rand
so here
rand {int value = rand()}
some may use int x = rand();˙ rand.value++; etc
with this syntax
int rand {rand = rand()}
you may use int x = rand(); rand++;
just ommiting this field named value but accesing this entity rand
stright
but its probably like this:
some(int a)˙˙˙˙˙˙ //some module
{
˙x++, y +=a, z=a˙˙˙˙˙˙˙˙˙˙˙˙˙ //some code
˙int x y z˙ // fields
˙foo (int x) {} //function definition
˙!(int x) {printf("%d", x)} //operator definition
˙(int x) %% (int y) {} //operator definition
}
//usage
some(4) //calls code
some˙ //has value of x y z
foo(2) //calls foo
!23 //printfs 23
6%%3 //calls operator code
so its ratcher clear, some may think if to not omit some ()
in this definition here but for clarity here its stays
in fact it dont seem tu be much doubtfull at least at some level
here and it showed most strightforward
there is no differentiation on read only and readwrite or write only arguments but in some way this is not needed as code
inside function or operator sjhows if it is read written or read and
written
if someone would like to define basic operators liek + *
its maybe also possible but there would need to be added some
hook into assembly
You're trying to create a language syntax like monkeys typing atwhould be probably present as modules just have its options to be
written and those are two realisations of those options
first has just ownning his ovn ram and second not (bein ram empty)
now what has {} to do with it?
hela know
maybe it should work like a cast orr just be and option of marking
output values?
{X} rand
rand {x}
i dont know yet
random in the hope they'll produce some Shakespeare.
What the hell are you doing spouting all this nonsense in such a
forum as this anyway?
Work it out privately and when you have something worth discussing
then maybe post to a relevant group, if sticking with usenet.
But I'd suggest not bothering with comp.lang.c unless your ideas are
anywhere in this ballpark. Currently your musings are a million miles
away.
it is very worth discussing its just above your level..so i csuggest
get to work and learn up
fir pisze:
fir pisze:
bartc pisze:overally i remember i was not quite sure how to define operators in c
On 03/11/2026 16:06, fir wrote:
fir pisze:
fir pisze:
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
my hiper modular thinking i was doin back then suggest that
both forms i mean
rand {int value = rand()}
rand [int value] {value = rand()}
there is also option
int rand { rand = rand()}
Which means...?
in the hipermodular approach (which is proper stright approach, not
some fancy imo) functions have properties of structures and
structures have properties of functions
so if you have struct rand {int value} you may acces the rand.value
but also instead of struct rand you could have just rand (int rand)
so you may acces rand
so here
rand {int value = rand()}
some may use int x = rand();˙ rand.value++; etc
with this syntax
int rand {rand = rand()}
you may use int x = rand(); rand++;
just ommiting this field named value but accesing this entity rand
stright
but its probably like this:
some(int a)˙˙˙˙˙˙ //some module
{
˙˙x++, y +=a, z=a˙˙˙˙˙˙˙˙˙˙˙˙˙ //some code
˙˙int x y z˙ // fields
˙˙foo (int x) {} //function definition
˙˙!(int x) {printf("%d", x)} //operator definition
˙˙(int x) %% (int y) {} //operator definition
}
note (though i already was talkin on it i will yet repeat it)
this above may seem obvious - after you seen it - BUT BEFORE it was
far from obvious - how far? you would take a long route with some non
binary decisions and observations..where this route is more like 50
important decisions/observations than 5 and thoce decisions are also not binary (though i dont know how to some could express it as a number but
for some ilustration if some could name this number by M and this
decison route length by 50 then the final result was like one from 50^M
(this is ofc some simplification but it imo ilustrates something)
so as to "stealing" its very easy to steal this - it is also very easy
to say its obvious and ignoring the long route here (and if something is eassy i may suspect people could do that eventually (i hope no but theoretically its possible - unfortunatelly..stealing it could involve lie'ing (laying?) so maybe it will not happen - besides not much people
are interested in that and maybe its good as im still working on that
(though some work or at least "intermediate work" here may be also seen
as a complete)
//usage
some(4) //calls code
some˙ //has value of x y z
foo(2) //calls foo
!23 //printfs 23
6%%3 //calls operator code
so its ratcher clear, some may think if to not omit some ()
in this definition here but for clarity here its stays
in fact it dont seem tu be much doubtfull at least at some level
here and it showed most strightforward
there is no differentiation on read only and readwrite or write only
arguments but in some way this is not needed as code
inside function or operator sjhows if it is read written or read and
written
if someone would like to define basic operators liek + *
its maybe also possible but there would need to be added some
hook into assembly
You're trying to create a language syntax like monkeys typing atwhould be probably present as modules just have its options to be >>>>>> written and those are two realisations of those options
first has just ownning his ovn ram and second not (bein ram empty) >>>>>>
now what has {} to do with it?
hela know
maybe it should work like a cast orr just be and option of marking >>>>>> output values?
{X} rand
rand {x}
i dont know yet
random in the hope they'll produce some Shakespeare.
What the hell are you doing spouting all this nonsense in such a
forum as this anyway?
Work it out privately and when you have something worth discussing
then maybe post to a relevant group, if sticking with usenet.
But I'd suggest not bothering with comp.lang.c unless your ideas are
anywhere in this ballpark. Currently your musings are a million
miles away.
it is very worth discussing its just above your level..so i csuggest
get to work and learn up
fir pisze:
bartc pisze:overally i remember i was not quite sure how to define operators in c
On 03/11/2026 16:06, fir wrote:
fir pisze:
fir pisze:
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
my hiper modular thinking i was doin back then suggest that
both forms i mean
rand {int value = rand()}
rand [int value] {value = rand()}
there is also option
int rand { rand = rand()}
Which means...?
in the hipermodular approach (which is proper stright approach, not
some fancy imo) functions have properties of structures and structures
have properties of functions
so if you have struct rand {int value} you may acces the rand.value
but also instead of struct rand you could have just rand (int rand)
so you may acces rand
so here
rand {int value = rand()}
some may use int x = rand();˙ rand.value++; etc
with this syntax
int rand {rand = rand()}
you may use int x = rand(); rand++;
just ommiting this field named value but accesing this entity rand
stright
but its probably like this:
some(int a)˙˙˙˙˙˙ //some module
{
˙x++, y +=a, z=a˙˙˙˙˙˙˙˙˙˙˙˙˙ //some code
˙int x y z˙ // fields
˙foo (int x) {} //function definition
˙!(int x) {printf("%d", x)} //operator definition
˙(int x) %% (int y) {} //operator definition
}
//usage
some(4) //calls code
some˙ //has value of x y z
foo(2) //calls foo
!23 //printfs 23
6%%3 //calls operator code
so its ratcher clear, some may think if to not omit some ()
in this definition here but for clarity here its stays
in fact it dont seem tu be much doubtfull at least at some level
here and it showed most strightforward
there is no differentiation on read only and readwrite or write only arguments but in some way this is not needed as code
inside function or operator sjhows if it is read written or read and
written
if someone would like to define basic operators liek + *
its maybe also possible but there would need to be added some
hook into assembly
You're trying to create a language syntax like monkeys typing atwhould be probably present as modules just have its options to be
written and those are two realisations of those options
first has just ownning his ovn ram and second not (bein ram empty)
now what has {} to do with it?
hela know
maybe it should work like a cast orr just be and option of marking
output values?
{X} rand
rand {x}
i dont know yet
random in the hope they'll produce some Shakespeare.
What the hell are you doing spouting all this nonsense in such a
forum as this anyway?
Work it out privately and when you have something worth discussing
then maybe post to a relevant group, if sticking with usenet.
But I'd suggest not bothering with comp.lang.c unless your ideas are
anywhere in this ballpark. Currently your musings are a million miles
away.
it is very worth discussing its just above your level..so i csuggest
get to work and learn up
fir pisze:
fir pisze:
bartc pisze:overally i remember i was not quite sure how to define operators in c
On 03/11/2026 16:06, fir wrote:
fir pisze:
fir pisze:
output one also can be defined like here
rand (int d) [int x] { x = rand()%d}
rand 10 x
my hiper modular thinking i was doin back then suggest that
both forms i mean
rand {int value = rand()}
rand [int value] {value = rand()}
there is also option
int rand { rand = rand()}
Which means...?
in the hipermodular approach (which is proper stright approach, not
some fancy imo) functions have properties of structures and
structures have properties of functions
so if you have struct rand {int value} you may acces the rand.value
but also instead of struct rand you could have just rand (int rand)
so you may acces rand
so here
rand {int value = rand()}
some may use int x = rand();˙ rand.value++; etc
with this syntax
int rand {rand = rand()}
you may use int x = rand(); rand++;
just ommiting this field named value but accesing this entity rand
stright
but its probably like this:
some(int a)˙˙˙˙˙˙ //some module
{
˙˙x++, y +=a, z=a˙˙˙˙˙˙˙˙˙˙˙˙˙ //some code
˙˙int x y z˙ // fields
˙˙foo (int x) {} //function definition
˙˙!(int x) {printf("%d", x)} //operator definition
˙˙(int x) %% (int y) {} //operator definition
}
//usage
some(4) //calls code
some˙ //has value of x y z
foo(2) //calls foo
!23 //printfs 23
6%%3 //calls operator code
so its ratcher clear, some may think if to not omit some ()
in this definition here but for clarity here its stays
in fact it dont seem tu be much doubtfull at least at some level
here and it showed most strightforward
there is no differentiation on read only and readwrite or write only
arguments but in some way this is not needed as code
inside function or operator sjhows if it is read written or read and
written
if someone would like to define basic operators liek + *
its maybe also possible but there would need to be added some
hook into assembly
it is open question how to "define" int in extended c (xc, maybe i
should use abbreviations extended c is xc deep c is dc and so on)
i could think about something like that at start but it needs
more thinking and im weary today but it may be some start
int {
˙˙˙˙ __asm_i32 value;
˙˙˙˙ (int a)=(int b)
˙˙˙˙ {
˙˙˙˙˙˙ _asm mov a b
˙˙˙˙ }
˙˙˙˙ (int a)+(int b)
˙˙˙˙ {
˙˙˙˙˙˙ int c;
˙˙˙˙˙˙ _asm mov register a
˙˙˙˙˙˙ _asm_add register b
˙˙˙˙˙˙ _asm mov c register
˙˙˙˙ }
˙˙˙˙ (int a)-(int b)
˙˙˙˙ {
˙˙˙˙˙˙ int c;
˙˙˙˙˙˙ _asm mov register a
˙˙˙˙˙˙ _asm_sub register b
˙˙˙˙˙˙ _asm mov c register
˙˙˙˙ }
˙˙˙˙ (int a)*(int b)
˙˙˙˙ {
˙˙˙˙˙˙ int c;
˙˙˙˙˙˙ _asm mov register a
˙˙˙˙˙˙ _asm_mul register b
˙˙˙˙˙˙ _asm mov c register
˙˙˙˙ }
˙˙˙˙ (int a)/(int b)
˙˙˙˙ {
˙˙˙˙˙˙ int c;
˙˙˙˙˙˙ _asm mov register a
˙˙˙˙˙˙ _asm_div register b
˙˙˙˙˙˙ _asm mov c register
˙˙˙˙ }
}
then
int x = a*b+c/d-e
would˙ just yeild to sequential calls
=(x,(-(/(+(*(a,b),c),d),e)))
should it work?
to weary to check
You're trying to create a language syntax like monkeys typing atwhould be probably present as modules just have its options to be >>>>>> written and those are two realisations of those options
first has just ownning his ovn ram and second not (bein ram empty) >>>>>>
now what has {} to do with it?
hela know
maybe it should work like a cast orr just be and option of marking >>>>>> output values?
{X} rand
rand {x}
i dont know yet
random in the hope they'll produce some Shakespeare.
What the hell are you doing spouting all this nonsense in such a
forum as this anyway?
Work it out privately and when you have something worth discussing
then maybe post to a relevant group, if sticking with usenet.
But I'd suggest not bothering with comp.lang.c unless your ideas are
anywhere in this ballpark. Currently your musings are a million
miles away.
it is very worth discussing its just above your level..so i csuggest
get to work and learn up
| Sysop: | Tetrazocine |
|---|---|
| Location: | Melbourne, VIC, Australia |
| Users: | 4 |
| Nodes: | 8 (0 / 8) |
| Uptime: | 190:54:16 |
| Calls: | 222 |
| Files: | 21,513 |
| Messages: | 85,912 |