Thread View: comp.lang.c
3 messages
3 total messages
Started by Tristan Wibberley
Sat, 14 Nov 2026 18:36
Re: (fir's c theory) scopes are wrong
Author: Tristan Wibberley
Date: Sat, 14 Nov 2026 18:36
Date: Sat, 14 Nov 2026 18:36
63 lines
3259 bytes
3259 bytes
On 12/05/2026 11:22, fir wrote:
> i once remember was writing about things that inheritance is wrong
> -
> the general conclusion realated to this (though specific conclusuins was
> other i dont remember but it was thatmore proper inheritance is
> (i donr remember) containing of substrutures (i dont remember so
> this is in arhive of this group, i remember i was writing on this)
>
> the general conclusion related to his is could ba said that tag systems
> are much better than tree structures - thsi is becouse if you have
> something (say its file) you couldĀ only have one directory and one
> directory above this when in reality you would like to have many
> - its tag system (or what its called if it have other name, i call it
> tag system)
>
> i not noticed hovever stict conclusion fo it : C scopes
>
> c scopes have tree structure { {}{{}{}}} etc so they ate just wrong
>
> you should allow the intersection od scopes
>
> like
> a{
>
> b{
> }//end of a
>
>
> } //end of b
There are a lot of difficulties with this, better to explicitly transfer
lives between scopes:
{
int var1,var2;
int var3;
}
: extend(var2,var3) :
{
++var1;
}
There are still some problems like: isn't it too easy to transfer a
pointer to a variable that's gone out of scope, easier than when
returning a value.
--
Tristan Wibberley
The message body is Copyright (C) 2026 Tristan Wibberley except
citations and quotations noted. All Rights Reserved except that you may,
of course, cite it academically giving credit to me, distribute it
verbatim as part of a usenet system or its archives, and use it to
promote my greatness and general superiority without misrepresentation
of my opinions other than my opinion of my greatness and general
superiority which you _may_ misrepresent. You definitely MAY NOT train
any production AI system with it but you may train experimental AI that
will only be used for evaluation of the AI methods it implements.
Re: (fir's c theory) scopes are wrong
Author: fir
Date: Sat, 14 Nov 2026 19:58
Date: Sat, 14 Nov 2026 19:58
92 lines
3611 bytes
3611 bytes
Tristan Wibberley pisze:
> On 12/05/2026 11:22, fir wrote:
>> i once remember was writing about things that inheritance is wrong
>> -
>> the general conclusion realated to this (though specific conclusuins was
>> other i dont remember but it was thatmore proper inheritance is
>> (i donr remember) containing of substrutures (i dont remember so
>> this is in arhive of this group, i remember i was writing on this)
>>
>> the general conclusion related to his is could ba said that tag systems
>> are much better than tree structures - thsi is becouse if you have
>> something (say its file) you couldĀ only have one directory and one
>> directory above this when in reality you would like to have many
>> - its tag system (or what its called if it have other name, i call it
>> tag system)
>>
>> i not noticed hovever stict conclusion fo it : C scopes
>>
>> c scopes have tree structure { {}{{}{}}} etc so they ate just wrong
>>
>> you should allow the intersection od scopes
>>
>> like
>> a{
>>
>> b{
>> }//end of a
>>
>>
>> } //end of b
>
>
> There are a lot of difficulties with this, better to explicitly transfer
> lives between scopes:
>
> {
> int var1,var2;
> int var3;
> }
> : extend(var2,var3) :
> {
> ++var1;
> }
>
>
> There are still some problems like: isn't it too easy to transfer a
> pointer to a variable that's gone out of scope, easier than when
> returning a value.
>
> no i dint mean that this is rather stupid, i meant more like
inter-function scopes or inter file-scopes
f1()
{
scope bunny;
}
f2()
{
scope bunny;
scope deer;
}
f3()
{
scope bunny;
}
f4()
{
scope deer;
}
acope bunny is inside f1 f2 f3
scope deer is f2 f4
so f2 seens also f4 ..f1 sees f2 f3 etc
this is alos to files if you get 120 files may build named
scopes same way ...
not like now when you include all say you see all - each one sees each one
some thing like "use/include module/file x" works a bit like that though
defining scopes works something diferent as module name is ona and
scopes may cover a pool of files
this mechanism eventually also could find where are the things given
file uses (which s sometimes hard) especially as maybe code editor sould
help with goin to such files
Re: (fir's c theory) scopes are wrong
Author: Tristan Wibberley
Date: Sun, 15 Nov 2026 00:54
Date: Sun, 15 Nov 2026 00:54
74 lines
4010 bytes
4010 bytes
On 14/11/2026 19:58, fir wrote:
> Tristan Wibberley pisze:
>> On 12/05/2026 11:22, fir wrote:
>>> i once remember was writing about things that inheritance is wrong
>>> -
>>> the general conclusion realated to this (though specific conclusuins was
>>> other i dont remember but it was thatmore proper inheritance is
>>> (i donr remember) containing of substrutures (i dont remember so
>>> this is in arhive of this group, i remember i was writing on this)
>>>
>>> the general conclusion related to his is could ba said that tag systems
>>> are much better than tree structures - thsi is becouse if you have
>>> something (say its file) you couldĀ only have one directory and one
>>> directory above this when in reality you would like to have many
>>> - its tag system (or what its called if it have other name, i call it
>>> tag system)
>>>
>>> i not noticed hovever stict conclusion fo it : C scopes
>>>
>>> c scopes have tree structure { {}{{}{}}} etc so they ate just wrong
>>>
>>> you should allow the intersection od scopes
>>>
>>> like
>>> a{
>>>
>>> b{
>>> }//end of a
>>>
>>>
>>> } //end of b
>>
>>
>> There are a lot of difficulties with this, better to explicitly transfer
>> lives between scopes:
>>
>> {
>> Ā Ā int var1,var2;
>> Ā Ā int var3;
>> }
>> Ā Ā : extend(var2,var3) :
>> {
>> Ā Ā ++var1;
>> }
>>
>>
>> There are still some problems like: isn't it too easy to transfer a
>> pointer to a variable that's gone out of scope, easier than when
>> returning a value.
>>
> no i dint mean that this is rather stupid, i meant more like
It's not /much/ stupid, C++ added move semantics to achieve basically
the same thing to much rejoicing despite the difficulties it adds to all
uses of the language. The above syntax can make a lot of things clearer
because it nominates objects as some kind of setup or background
facility that relate objects of the meat of the problem but which aren't
involved in it.
of course, above I meant "++var2" or "++var3" instead of "++var1".
--
Tristan Wibberley
The message body is Copyright (C) 2026 Tristan Wibberley except
citations and quotations noted. All Rights Reserved except that you may,
of course, cite it academically giving credit to me, distribute it
verbatim as part of a usenet system or its archives, and use it to
promote my greatness and general superiority without misrepresentation
of my opinions other than my opinion of my greatness and general
superiority which you _may_ misrepresent. You definitely MAY NOT train
any production AI system with it but you may train experimental AI that
will only be used for evaluation of the AI methods it implements.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads