🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.lang.rust
514 messages
514 total messages Page 3 of 11 Started by Lynn McGuire Wed, 14 Oct 2026 04:18
Page 3 of 11 • 514 total messages
Re: “The end of software secrecy is almost upon us"
#132
Author: Johann 'Myrkraverk' Oskarsson
Date: Tue, 20 Oct 2026 17:27
46 lines
3209 bytes
On 10/21/2026 1:20 AM, Cryptoengineer wrote:
> On 10/20/2026 1:46 AM, Titus G wrote:
>> On 20/10/2026 18:28, Thomas Koenig wrote:
>>> Scott Dorsey <kludge@panix.com> schrieb:
>>>> Lynn McGuire  <lynnmcguire5@gmail.com> wrote:
>>>>> One of the things that I am enjoying is that F2C gets rid of about 75%
>>>>> of the Fortran Gotos.  The remaining 25% Gotos usually make some 
>>>>> sense.
>>>>> Ok, a little sense that any C or C++ programmer would have never 
>>>>> used a
>>>>> goto there.
>>>>
>>>> It drives me up the wall when people use a goto to jump out of a do 
>>>> loop.
>>>> The compiler is doing so much cleanup work that the programmer never 
>>>> sees.
>>>
>>> Again, care to give an example?
>>
>> I thought that what was called Structured Programming became an
>> inviolable law when invented by whom I do not know but suspect that
>> bugger for the bottle or even earlier.
> 
> ITYM:
> 
> Edgar Dijkstra: Go To Statement Considered Harmful
> 
> https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf
> 
> pt

Some people think Michael Jackson invented structured programming, but
he merely wrote about it.

   https://en.wikipedia.org/wiki/Jackson_structured_programming

I admit not to have gotten myself a copy of /Principles of Program
Design/ but it's on my to-be-tsundoku list.


Best wishes, and happy structured programming!
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon
#105
Author: boltar
Date: Wed, 21 Oct 2026 08:05
30 lines
2668 bytes
On Wed, 21 Oct 2026 07:55:39 -0000 (UTC)
Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> wrote:
>On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
>
>> On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>
>>> On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
>>>
>>>> ** The setting a flag method which has to be checked in every
>>>>    nested loop test is just an [asinine] way to code.
>>>
>>> If you have to do cleanup at each level before exiting, then it
>>> works perfectly well.
>>
>> It may well work but it doesn't make it good. Its harder to follow -
>> whereas a goto out of a deeply nested loops is blindingly obvious -
>> and its less efficient.
>
>The goto from the deep inner block to the outer one is “blindingly
>obvious” ... ly wrong.

Fine, well you stick with your gotos-are-bad religious doctrine based on
something one guy said 50 years ago and the rest of us will carry on writing
usable and easy to follow code.

>What about the cleanup?

What about it? you think a flag test in a loop automagically fixes that?

Re: “The end of software secrecy is almost upon
#106
Author: Johann 'Myrkraverk' Oskarsson
Date: Wed, 21 Oct 2026 12:09
54 lines
4085 bytes
On 10/21/2026 7:18 AM, Charlie Gibbs wrote:
> On 2026-10-20, Lawrence D’Oliveiro <ldo@nz.invalid> wrote:
> 
>> On Tue, 20 Oct 2026 19:04:55 GMT, Charlie Gibbs wrote:
>>
>>> The undisciplined use of GOTOs is bad, agreed.
>>
>> Is there such a thing as a *disciplined* use of gotos?
> 
> Yes, especially in COBOL or assembly language.  For instance,
> a GOTO to the end of a function ensures any of its cleanup code
> gets executed, and fulfils a goal of structured proramming:
> each function has one exit point.
> 
>> I find the C code I write tends to do a lot of dynamic resource
>> allocations. These can sometimes fail with errors. So error recovery
>> will invariably involve cleaning up those parts of the allocations
>> which already succeeded. Gotos are no good for this; you need to exit
>> levels of structure nesting one by one, disposing of allocations as
>> you go.
> 
> I know that a lot of CS types are going to stick pins into little
> dolls that look like me for saying this, but IMHO resource pointers,
> handles, etc. should be global.  Possible exceptions are resources
> that are going to be used solely by the current function - but even
> then, if that function calls another function that fails horribly,
> there's stuff that might not get cleaned up.  That's why all my
> C programs contain a function quit_cleanup(char *errmsg), which
> de-allocates all resources and then exits (displaying "errmsg"
> if it isn't NULL).  I can call that function anywhere, safe in
> the knowledge that by the time it finishes (it never returns),
> everything will have be freed.
> 

Side note: I chose not to comment on any of the other followups by the
less experienced coders.  I personally have no problem with your app-
roach.

That works for a single process, but once you start making libraries
like Lua that can be loaded and then unloaded the rules change somewhat.

SQLite3 can be used similarly.

Though I doubt many people load either library dynamically, and then un-
load; yet as far as I'm aware, both libraries support such usage.

I added comp.lang.misc because I'm not aware of a Lua discussion group.

Best wishes, and happy resource cleanup!	
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon us"
#107
Author: Johann 'Myrkraverk' Oskarsson
Date: Wed, 21 Oct 2026 12:21
42 lines
2984 bytes
On 10/21/2026 9:30 AM, Lawrence D’Oliveiro wrote:
> On Tue, 20 Oct 2026 17:15:28 -0000 (UTC), Thomas Koenig wrote:
> 
>> But the attitude of not caring about speed can have grave results
>> when the inefficiencies pile up.
> 
> That’s not usually how code works, though. Execution time tends to
> follow a Pareto distribution -- spend your effort on the 10% of the
> code where 90% of the time is being spent, and that gives significant
> improvements without having to mess around with the other 90% of the
> code.

This is true of code.  Yet, you can math yourself to a better solution.

The /obvious/ example everyone here knows is sum of integers, as

   int sumint( int a ) {
     int value = 0 ;
     for ( int i = 1 ; i <= a ; i++ )
       value += i ;
     return value ;
   }

whereas a mathematician might code it as

   int sumint( int a ) { return a * ( a + 1 ) / 2 ; }

which is much faster for a large a.

The point I'm making here is that if you myopically focus too much on
the hot code, you might miss an obvious mathematical optimization.

I added sci.math in case the wizards there want to add more obvious ex-
amples I may not be aware of.


Best wishes, and happy optimizations!
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon
#108
Author: Thomas Koenig
Date: Wed, 21 Oct 2026 13:27
29 lines
2713 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> schrieb:
> On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
>
>> On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>
>>> On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
>>>
>>>> ** The setting a flag method which has to be checked in every
>>>>    nested loop test is just an [asinine] way to code.
>>>
>>> If you have to do cleanup at each level before exiting, then it
>>> works perfectly well.
>>
>> It may well work but it doesn't make it good. Its harder to follow -
>> whereas a goto out of a deeply nested loops is blindingly obvious -
>> and its less efficient.
>
> The goto from the deep inner block to the outer one is “blindingly
> obvious” ... ly wrong.
>
> What about the cleanup?

What cleanup, exactly?  We are talking Fortran, remember.


-- 
This USENET posting was made without artificial intelligence,
artificial impertinence, artificial arrogance, artificial stupidity,
artificial flavorings or artificial colorants.
Re: “The end of software secrecy is almost upon
#109
Author: Peter Flass
Date: Wed, 21 Oct 2026 14:37
9 lines
1834 bytes
On 10/20/26 20:31, John Levine wrote:
> According to William Hyde  <wthyde1953@gmail.com>:
>> Ah, I do love zombie comments, where someone has changed the code but
>> left the comments as  they were.
> 
>       i += 2;    /* add 1 to i */
> 

LOL!
Re: “The end of software secrecy is almost upon
#110
Author: Peter Flass
Date: Wed, 21 Oct 2026 14:41
35 lines
3199 bytes
On 10/21/26 01:05, boltar@battlestar.co.uk wrote:
> On Wed, 21 Oct 2026 07:55:39 -0000 (UTC)
> Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> wrote:
>> On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
>>
>>> On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>>
>>>> On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
>>>>
>>>>> ** The setting a flag method which has to be checked in every
>>>>>     nested loop test is just an [asinine] way to code.
>>>>
>>>> If you have to do cleanup at each level before exiting, then it
>>>> works perfectly well.
>>>
>>> It may well work but it doesn't make it good. Its harder to follow -
>>> whereas a goto out of a deeply nested loops is blindingly obvious -
>>> and its less efficient.
>>
>> The goto from the deep inner block to the outer one is “blindingly
>> obvious” ... ly wrong.
> 
> Fine, well you stick with your gotos-are-bad religious doctrine based on
> something one guy said 50 years ago and the rest of us will carry on writing
> usable and easy to follow code.
> 
>> What about the cleanup?
> 
> What about it? you think a flag test in a loop automagically fixes that?

I occasionally use GOTOs, but usually only after considering other 
alternatives. The flag test is the big red flag. If I have to keep 
testing a flag for several layers to get out of a loop, there has to be 
a better way.
Re: “The end of software secrecy is almost upon
#111
Author: Radey Shouman
Date: Wed, 21 Oct 2026 14:41
16 lines
1976 bytes
ted@loft.tnolan.com (Ted Nolan <tednolan>) writes:

> In article <11b9bn2$28tm$2@gal.iecc.com>, John Levine  <johnl@taugh.com> wrote:
>>According to William Hyde  <wthyde1953@gmail.com>:
>>>Ah, I do love zombie comments, where someone has changed the code but 
>>>left the comments as  they were.
>>
>>     i += 2;    /* add 1 to i */
>>
>
> And then you find out it *does* add 1 to i.  Somehow.

Fixed point i with one fractional bit.  Or something.

-- 
 
Re: “The end of software secrecy is almost upon
#113
Author: Scott Lurndal
Date: Wed, 21 Oct 2026 14:53
17 lines
1794 bytes
Radey Shouman <shouman@comcast.net> writes:
>ted@loft.tnolan.com (Ted Nolan <tednolan>) writes:
>
>> In article <11b9bn2$28tm$2@gal.iecc.com>, John Levine  <johnl@taugh.com> wrote:
>>>According to William Hyde  <wthyde1953@gmail.com>:
>>>>Ah, I do love zombie comments, where someone has changed the code but 
>>>>left the comments as  they were.
>>>
>>>     i += 2;    /* add 1 to i */
>>>
>>
>> And then you find out it *does* add 1 to i.  Somehow.
>
>Fixed point i with one fractional bit.  Or something.

Or computing an index into an array of 16-bit entities
in an array of bytes.
Re: Re: “The end of software secrecy is almost upon
#114
Author: Scott Dorsey
Date: Wed, 21 Oct 2026 15:06
16 lines
1718 bytes
In article <11b9qna$pqb8$1@dont-email.me>,  <boltar@battlestar.co.uk> wrote:
>David Brown <david.brown@hesbynett.no> wrote:
>>And people /do/ use concepts, even if you do not.
>
>Yeah, on university CS courses. They're just more metaprogramming fucking
>about and add nothing of actual value for the jobbing programmer trying to
>solve a problem.

I kind of thought that way once.  Then I worked with someone who decided
to solve a problem that was NP-hard.  I mentioned to him, "you know this is
NP-hard, you'll never make it work for a reasonable number of elements"
but he was convinced there was a solution.  He worked on it for about a year
before getting fired.
--scott
-- 
"C'est un Nagra. C'est suisse, et tres, tres precis."
Re: “The end of software secrecy is almost upon
#112
Author: Johann 'Myrkraverk' Oskarsson
Date: Wed, 21 Oct 2026 15:10
22 lines
2470 bytes
On 10/21/2026 11:06 PM, Scott Dorsey wrote:
> In article <11b9qna$pqb8$1@dont-email.me>,  <boltar@battlestar.co.uk> wrote:
>> David Brown <david.brown@hesbynett.no> wrote:
>>> And people /do/ use concepts, even if you do not.
>>
>> Yeah, on university CS courses. They're just more metaprogramming fucking
>> about and add nothing of actual value for the jobbing programmer trying to
>> solve a problem.
> 
> I kind of thought that way once.  Then I worked with someone who decided
> to solve a problem that was NP-hard.  I mentioned to him, "you know this is
> NP-hard, you'll never make it work for a reasonable number of elements"
> but he was convinced there was a solution.  He worked on it for about a year
> before getting fired.
> --scott

During that year, did he rewrite the code in Rust too?
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon
#115
Author: Dennis Boone
Date: Wed, 21 Oct 2026 15:57
7 lines
1843 bytes
 > >     i += 2;    /* add 1 to i */

 > And then you find out it *does* add 1 to i.  Somehow.

Very small values of 2.

De
Re: “The end of software secrecy is almost upon
#116
Author: David Brown
Date: Wed, 21 Oct 2026 15:57
67 lines
4431 bytes
On 21/10/2026 09:47, boltar@battlestar.co.uk wrote:
> On Tue, 20 Oct 2026 20:50:58 +0200
> David Brown <david.brown@hesbynett.no> wrote:
>> On 20/10/2026 19:24, boltar@battlestar.co.uk wrote:
>>> If C/C++ had multi level break and continue keywords goto would almost
>>> never be needed**. There's no reason they can't be added - along with 
>>> a lot
>> of
>>> other useful but basic fatures (eg non POD switch, native concatting 
>>> numbers
>> to
>>> std::string without calling to_string) - but I guess the committee 
>>> are too
>> busy
>>> circle jerking with esoteric crap no one will ever use (eg concepts) to
>> bother.
>>>
>>
>> Multi-level break and continue (named loops) is on its way to C++, and 
>> will almost certainly be accepted sooner or later (since it is already 
>> in the draft of the next C standard):
> 
> They should have been added 30 years ago.
> 

That's your opinion, so I won't argue with it.  I haven't felt the need 
of them myself, but I appreciate that some people expect to find them 
useful.  They are now in the draft C2y, and implemented in gcc.  It is 
likely (though not guaranteed) that they will make it to C++ too.

Wishing they had been added 30 years ago does nothing - adding your 
voice of support in the C++ standards mailing lists, or asking gcc to 
add it as an extension in C++ might be more useful.

>> And people /do/ use concepts, even if you do not.
> 
> Yeah, on university CS courses. They're just more metaprogramming fucking
> about and add nothing of actual value for the jobbing programmer trying to
> solve a problem.

I use them in my code.  I am not alone in that.

You are using them too, if you are using a relatively modern C++ 
compiler - they are used in modern C++ standard library implementations.

It's okay to consider them as "advanced", or something that "ordinary" 
programmers don't need - there's lots of stuff in C++ that most people 
don't need, but which exists so that it's easier to write efficient 
libraries that "ordinary" programmers /do/ use.

> 
>> You might want to do some research before insulting the people who are 
>> actually doing the work in driving languages forward.
> 
> Driving it forward into a ditch. The language is already so needlessly
> complicated that students just swerve it for more user friendly ones, 
> mainly
> Python. And Rust is already nudging C aside. If they ever add a decent 
> object model to it then C++ will be next in the firing line.
> 
> If I was starting out today in IT I wouldn't touch C++ with the proverbial
> barge pole.
> 

Ok.  Again, that's your opinion.

Re: “The end of software secrecy is almost upon
#117
Author: Ted Nolan <tednolan>
Date: Wed, 21 Oct 2026 16:02
16 lines
1587 bytes
In article <_Kicnccuc79TfUX3nZ2dnZfqnPadnZ2d@giganews.com>,
Dennis Boone <drb@ihatespam.msu.edu> wrote:
> > >     i += 2;    /* add 1 to i */
>
> > And then you find out it *does* add 1 to i.  Somehow.
>
>Very small values of 2.
>
>De

A co-worker actually tracked down such an issue.  It turned out that
in certain cases of misuse of indirection, you could assign new values
to constants, such that '2' might have the value 1.
-- 
columbiaclosings.com
What's not in Columbia anymore..
Re: Re: “The end of software secrecy is almost upon
#118
Author: Scott Dorsey
Date: Wed, 21 Oct 2026 16:29
24 lines
2021 bytes
Johann 'Myrkraverk' Oskarsson  <johann@myrkraverk.invalid> wrote:
>On 10/21/2026 11:06 PM, Scott Dorsey wrote:
>> In article <11b9qna$pqb8$1@dont-email.me>,  <boltar@battlestar.co.uk> wrote:
>>> David Brown <david.brown@hesbynett.no> wrote:
>>>> And people /do/ use concepts, even if you do not.
>>>
>>> Yeah, on university CS courses. They're just more metaprogramming fucking
>>> about and add nothing of actual value for the jobbing programmer trying to
>>> solve a problem.
>> 
>> I kind of thought that way once.  Then I worked with someone who decided
>> to solve a problem that was NP-hard.  I mentioned to him, "you know this is
>> NP-hard, you'll never make it work for a reasonable number of elements"
>> but he was convinced there was a solution.  He worked on it for about a year
>> before getting fired.
>
>During that year, did he rewrite the code in Rust too?

If he'd have thought of that he probably could have milked another year out!
--scott


-- 
"C'est un Nagra. C'est suisse, et tres, tres precis."
Re: Re: “The end of software secrecy is almost upon
#119
Author: boltar
Date: Wed, 21 Oct 2026 17:50
18 lines
2200 bytes
On Wed, 21 Oct 2026 11:06:19 -0400 (EDT)
kludge@panix.com (Scott Dorsey) wrote:
>In article <11b9qna$pqb8$1@dont-email.me>,  <boltar@battlestar.co.uk> wrote:
>>David Brown <david.brown@hesbynett.no> wrote:
>>>And people /do/ use concepts, even if you do not.
>>
>>Yeah, on university CS courses. They're just more metaprogramming fucking
>>about and add nothing of actual value for the jobbing programmer trying to
>>solve a problem.
>
>I kind of thought that way once.  Then I worked with someone who decided
>to solve a problem that was NP-hard.  I mentioned to him, "you know this is
>NP-hard, you'll never make it work for a reasonable number of elements"
>but he was convinced there was a solution.  He worked on it for about a year
>before getting fired.

I've no idea what point you're trying to make there.
Re: Re: “The end of software secrecy is almost upon
#120
Author: boltar
Date: Wed, 21 Oct 2026 18:02
55 lines
4038 bytes
On Wed, 21 Oct 2026 17:57:35 +0200
David Brown <david.brown@hesbynett.no> wrote:
>On 21/10/2026 09:47, boltar@battlestar.co.uk wrote:
>> They should have been added 30 years ago.
>> 
>
>That's your opinion, so I won't argue with it.  I haven't felt the need 
>of them myself, but I appreciate that some people expect to find them 

So you've never had to jump out of deeply nested loops? Are you the
"hello world" guy?

>Wishing they had been added 30 years ago does nothing - adding your 
>voice of support in the C++ standards mailing lists, or asking gcc to 
>add it as an extension in C++ might be more useful.

Its unlikely any compiler authors would add an extension that fundamentally
changes the core flow of control without it being part of the standard.

>> Yeah, on university CS courses. They're just more metaprogramming fucking
>> about and add nothing of actual value for the jobbing programmer trying to
>> solve a problem.
>
>I use them in my code.  I am not alone in that.

So fill us in on exactly what problem they solve because I've yet to see
any use case that couldn't have been done with template specialisation,
conditionals and typeid(). But I guess if you like yet more obtuse syntax
that makes compilers even more bloated and bug prone then I'm sure they're
a winner.

>It's okay to consider them as "advanced", or something that "ordinary" 
>programmers don't need - there's lots of stuff in C++ that most people 
>don't need, but which exists so that it's easier to write efficient 
>libraries that "ordinary" programmers /do/ use.

As I've already pointed out - there are far more mundane features that
your average programmer WOULD use than the commitee can't be bothered to
add probably because there's less peer kudos on that kind of thing than a
load of highbrow bullshit that looks cool on a CS lecture whiteboard.

>> Driving it forward into a ditch. The language is already so needlessly
>> complicated that students just swerve it for more user friendly ones, 
>> mainly
>> Python. And Rust is already nudging C aside. If they ever add a decent 
>> object model to it then C++ will be next in the firing line.
>> 
>> If I was starting out today in IT I wouldn't touch C++ with the proverbial
>> barge pole.
>> 
>
>Ok.  Again, that's your opinion.

Take a look around you. How many new startups are recruiting C++ devs?
Re: “The end of software secrecy is almost upon
#121
Author: David Brown
Date: Wed, 21 Oct 2026 18:26
102 lines
6263 bytes
On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
> On Wed, 21 Oct 2026 17:57:35 +0200
> David Brown <david.brown@hesbynett.no> wrote:
>> On 21/10/2026 09:47, boltar@battlestar.co.uk wrote:
>>> They should have been added 30 years ago.
>>>
>>
>> That's your opinion, so I won't argue with it.  I haven't felt the 
>> need of them myself, but I appreciate that some people expect to find 
>> them 
> 
> So you've never had to jump out of deeply nested loops? Are you the
> "hello world" guy?

No, and no.

There are plenty of ways to handle getting out of nested control 
structures.  I can see why some people would like labelled loops and 
switches, and to be able to break or continue on those labels, but it 
simply hasn't been a problem for me.  Alternatives like return from the 
function, or extra flag variables have been fine (the compiler turns the 
flag variables into jumps).  It is quite possible that I have written 
code where I would have used multi-level breaks if they had been 
available at the time, but that's quite different from feeling they were 
missing from the language or that they would have been a much better 
solution.

> 
>> Wishing they had been added 30 years ago does nothing - adding your 
>> voice of support in the C++ standards mailing lists, or asking gcc to 
>> add it as an extension in C++ might be more useful.
> 
> Its unlikely any compiler authors would add an extension that fundamentally
> changes the core flow of control without it being part of the standard.
> 

Don't exaggerate.  It's a minor feature, with zero cost - it's a neater 
way to write "goto end_of_loop".

>>> Yeah, on university CS courses. They're just more metaprogramming 
>>> fucking
>>> about and add nothing of actual value for the jobbing programmer 
>>> trying to
>>> solve a problem.
>>
>> I use them in my code.  I am not alone in that.
> 
> So fill us in on exactly what problem they solve because I've yet to see
> any use case that couldn't have been done with template specialisation,
> conditionals and typeid(). But I guess if you like yet more obtuse syntax
> that makes compilers even more bloated and bug prone then I'm sure they're
> a winner.

I haven't used them in any situation where they were /needed/, but I 
have used them where they make code neater and clearer.  A lot of 
situations where you use concepts could be handled by a mess of 
enable_if's - but concepts are a better way to write the code.

> 
>> It's okay to consider them as "advanced", or something that "ordinary" 
>> programmers don't need - there's lots of stuff in C++ that most people 
>> don't need, but which exists so that it's easier to write efficient 
>> libraries that "ordinary" programmers /do/ use.
> 
> As I've already pointed out - there are far more mundane features that
> your average programmer WOULD use than the commitee can't be bothered to
> add probably because there's less peer kudos on that kind of thing than a
> load of highbrow bullshit that looks cool on a CS lecture whiteboard.

You are clearly have a lot of pent-up anger and frustration about 
something, since you haven't the faintest clue as to who the standards 
committee are, what they do, how they do it, and why they do it. 
(Here's a clue - most are C++ /users/, some are C++ compiler or standard 
library implementers.  They are not academics.)

> 
>>> Driving it forward into a ditch. The language is already so needlessly
>>> complicated that students just swerve it for more user friendly ones, 
>>> mainly
>>> Python. And Rust is already nudging C aside. If they ever add a 
>>> decent object model to it then C++ will be next in the firing line.
>>>
>>> If I was starting out today in IT I wouldn't touch C++ with the 
>>> proverbial
>>> barge pole.
>>>
>>
>> Ok.  Again, that's your opinion.
> 
> Take a look around you. How many new startups are recruiting C++ devs?
> 

We see it all the time.  Of course, different programming fields want 
different languages - C++ is suitable for some things, and less so for 
other things.  There is no one language to fit all usage.

There's plenty I don't like about C++ too.  But I don't have some weird 
conspiracy theory about how it is being destroyed by some ivory tower 
academics that want C++ to be hard so that they can look smart, or 
whatever your delusions are.

Re: Re: “The end of software secrecy is almost upon
#122
Author: boltar
Date: Wed, 21 Oct 2026 18:48
23 lines
2825 bytes
On Wed, 21 Oct 2026 20:26:29 +0200
David Brown <david.brown@hesbynett.no> wrote:
>On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
>> Take a look around you. How many new startups are recruiting C++ devs?
>> 
>
>We see it all the time.  Of course, different programming fields want 
>different languages - C++ is suitable for some things, and less so for 
>other things.  There is no one language to fit all usage.
>
>There's plenty I don't like about C++ too.  But I don't have some weird 
>conspiracy theory about how it is being destroyed by some ivory tower 
>academics that want C++ to be hard so that they can look smart, or 
>whatever your delusions are.

Not sure why you think its conspiracy anything. I use the language on a
daily basis and everytime a new version comes out I hope they've added
something useful but since 2014 its been a law of diminishing returns.
Plus there's unexplained omissions - eg threads have been part of the core
language since 2011. Great, but what about processes? When do we get them?
Sure, I could just use fork() but then I could also just use pthread_create()
too. 
Re: Re: “The end of software secrecy is almost upon
#123
Author: Dan Cross
Date: Wed, 21 Oct 2026 19:01
33 lines
2731 bytes
In article <11bb1da$qfn9$1@dont-email.me>,  <boltar@battlestar.co.uk> wrote:
>On Wed, 21 Oct 2026 20:26:29 +0200
>David Brown <david.brown@hesbynett.no> wrote:
>>On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
>>> Take a look around you. How many new startups are recruiting C++ devs?
>>> 
>>
>>We see it all the time.  Of course, different programming fields want 
>>different languages - C++ is suitable for some things, and less so for 
>>other things.  There is no one language to fit all usage.
>>
>>There's plenty I don't like about C++ too.  But I don't have some weird 
>>conspiracy theory about how it is being destroyed by some ivory tower 
>>academics that want C++ to be hard so that they can look smart, or 
>>whatever your delusions are.
>
>Not sure why you think its conspiracy anything. I use the language on a
>daily basis and everytime a new version comes out I hope they've added
>something useful but since 2014 its been a law of diminishing returns.
>Plus there's unexplained omissions - eg threads have been part of the core
>language since 2011. Great, but what about processes? When do we get them?
>Sure, I could just use fork() but then I could also just use pthread_create()
>too. 

One can implement a pretty reasonable threads library given the
virtual machine model of standard C or C++.  Processes?  With
their own address spaces, credentials, resource limits, IPC
mechanisms, potentially running different programs, and so on?

Not so much.  You need an operating system for that, son.

	- Dan C.
	
Re: “The end of software secrecy is almost upon
#125
Author: Chris M. Thomasson
Date: Wed, 21 Oct 2026 19:17
9 lines
1876 bytes
On 10/20/2026 8:31 PM, John Levine wrote:
> According to William Hyde  <wthyde1953@gmail.com>:
>> Ah, I do love zombie comments, where someone has changed the code but
>> left the comments as  they were.
> 
>       i += 2;    /* add 1 to i */
> 

Oh how fun!
Re: “The end of software secrecy is almost upon
#124
Author: Peter Flass
Date: Wed, 21 Oct 2026 21:12
23 lines
2682 bytes
On 10/21/26 10:50, boltar@battlestar.co.uk wrote:
> On Wed, 21 Oct 2026 11:06:19 -0400 (EDT)
> kludge@panix.com (Scott Dorsey) wrote:
>> In article <11b9qna$pqb8$1@dont-email.me>,  <boltar@battlestar.co.uk> wrote:
>>> David Brown <david.brown@hesbynett.no> wrote:
>>>> And people /do/ use concepts, even if you do not.
>>>
>>> Yeah, on university CS courses. They're just more metaprogramming fucking
>>> about and add nothing of actual value for the jobbing programmer trying to
>>> solve a problem.
>>
>> I kind of thought that way once.  Then I worked with someone who decided
>> to solve a problem that was NP-hard.  I mentioned to him, "you know this is
>> NP-hard, you'll never make it work for a reasonable number of elements"
>> but he was convinced there was a solution.  He worked on it for about a year
>> before getting fired.
> 
> I've no idea what point you're trying to make there.

He's trying to say that his university CS work paid off.

I agree that the work for a CS degree is useful. If nothing else I 
understand more now.
Re: Re: “The end of software secrecy is almost upon
#126
Author: Scott Dorsey
Date: Wed, 21 Oct 2026 23:20
23 lines
2038 bytes
In article <11bau11$29ugh$1@dont-email.me>,  <boltar@battlestar.co.uk> wrote:
>On Wed, 21 Oct 2026 11:06:19 -0400 (EDT)
>kludge@panix.com (Scott Dorsey) wrote:
>>In article <11b9qna$pqb8$1@dont-email.me>,  <boltar@battlestar.co.uk> wrote:
>>>David Brown <david.brown@hesbynett.no> wrote:
>>>>And people /do/ use concepts, even if you do not.
>>>
>>>Yeah, on university CS courses. They're just more metaprogramming fucking
>>>about and add nothing of actual value for the jobbing programmer trying to
>>>solve a problem.
>>
>>I kind of thought that way once.  Then I worked with someone who decided
>>to solve a problem that was NP-hard.  I mentioned to him, "you know this is
>>NP-hard, you'll never make it work for a reasonable number of elements"
>>but he was convinced there was a solution.  He worked on it for about a year
>>before getting fired.
>
>I've no idea what point you're trying to make there.

That knowing algorithm analysis has a valid use in the real world.
--scott
-- 
"C'est un Nagra. C'est suisse, et tres, tres precis."
Re: “The end of software secrecy is almost upon
#127
Author: Lawrence D’Oliveiro
Date: Thu, 22 Oct 2026 00:23
11 lines
2074 bytes
On Wed, 21 Oct 2026 08:05:02 -0000 (UTC), boltar wrote:

> On Wed, 21 Oct 2026 07:55:39 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>
>> What about the cleanup?
> 
> What about it? you think a flag test in a loop automagically fixes that?

It needs to be done at each level before exiting to the outer level.

I can show you some example code, if you like.
Re: “The end of software secrecy is almost upon
#128
Author: Lawrence D’Oliveiro
Date: Thu, 22 Oct 2026 00:24
29 lines
2780 bytes
On Wed, 21 Oct 2026 13:27:48 -0000 (UTC), Thomas Koenig wrote:

> Lawrence D’Oliveiro <ldo@nz.invalid> schrieb:
>>
>> On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
>>
>>> On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>>
>>>> On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
>>>>
>>>>> ** The setting a flag method which has to be checked in every
>>>>>    nested loop test is just an [asinine] way to code.
>>>>
>>>> If you have to do cleanup at each level before exiting, then it
>>>> works perfectly well.
>>>
>>> It may well work but it doesn't make it good. Its harder to follow
>>> - whereas a goto out of a deeply nested loops is blindingly
>>> obvious - and its less efficient.
>>
>> The goto from the deep inner block to the outer one is “blindingly
>> obvious” ... ly wrong.
>>
>> What about the cleanup?
>
> What cleanup, exactly?  We are talking Fortran, remember.

The principle applies to Fortran as it does to any language where you
have to explicitly manage storage allocations.
Re: “The end of software secrecy is almost upon
#129
Author: Lawrence D’Oliveiro
Date: Thu, 22 Oct 2026 00:36
15 lines
2089 bytes
On Wed, 21 Oct 2026 12:17:48 -0700, Chris M. Thomasson wrote:

>>       i += 2;    /* add 1 to i */
>
> Oh how fun!

That’s not the kind of comment I would have written, because I can’t
see how it could ever have been useful. Perhaps something more explanatory,
like (wild guess)

       i += 2; /* increment occurrences */

and then the reader looks at the surrounding code to see what exactly
are the “occurrences” being counted up, and that either confirms that
2 is the right number to add, or it does not.
Re: “The end of software secrecy is almost upon
#130
Author: Lawrence D’Oliveiro
Date: Thu, 22 Oct 2026 00:37
8 lines
1845 bytes
On 21 Oct 2026 16:02:16 GMT, Ted Nolan <tednolan> wrote:

> A co-worker actually tracked down such an issue. It turned out that
> in certain cases of misuse of indirection, you could assign new
> values to constants, such that '2' might have the value 1.

Certain early Fortran implementations. Couldn’t happen in any other
language ...
Re: “The end of software secrecy is almost upon
#131
Author: Lawrence D’Oliveiro
Date: Thu, 22 Oct 2026 00:40
9 lines
2125 bytes
On Wed, 21 Oct 2026 07:41:06 -0700, Peter Flass wrote:

> I occasionally use GOTOs, but usually only after considering other
> alternatives. The flag test is the big red flag. If I have to keep
> testing a flag for several layers to get out of a loop, there has to
> be a better way.

If the flag indicates “an error has occurred”, then I think this is
entirely reasonable.
Re: “The end of software secrecy is almost upon
#133
Author: Johann 'Myrkraverk' Oskarsson
Date: Thu, 22 Oct 2026 01:14
40 lines
3188 bytes
On 10/22/2026 8:24 AM, Lawrence D’Oliveiro wrote:
> On Wed, 21 Oct 2026 13:27:48 -0000 (UTC), Thomas Koenig wrote:
> 
>> Lawrence D’Oliveiro <ldo@nz.invalid> schrieb:
>>>
>>> On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
>>>
>>>> On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>>>
>>>>> On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
>>>>>
>>>>>> ** The setting a flag method which has to be checked in every
>>>>>>     nested loop test is just an [asinine] way to code.
>>>>>
>>>>> If you have to do cleanup at each level before exiting, then it
>>>>> works perfectly well.
>>>>
>>>> It may well work but it doesn't make it good. Its harder to follow
>>>> - whereas a goto out of a deeply nested loops is blindingly
>>>> obvious - and its less efficient.
>>>
>>> The goto from the deep inner block to the outer one is “blindingly
>>> obvious” ... ly wrong.
>>>
>>> What about the cleanup?
>>
>> What cleanup, exactly?  We are talking Fortran, remember.
> 
> The principle applies to Fortran as it does to any language where you
> have to explicitly manage storage allocations.

Never mind that when you use garbage collected languages, the finalizer
can run at any point in the future, sometimes when you don't want it to.

Such as too late.
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon
#134
Author: Johann 'Myrkraverk' Oskarsson
Date: Thu, 22 Oct 2026 01:21
39 lines
3031 bytes
On 10/22/2026 8:36 AM, Lawrence D’Oliveiro wrote:
> On Wed, 21 Oct 2026 12:17:48 -0700, Chris M. Thomasson wrote:
> 
>>>        i += 2;    /* add 1 to i */
>>
>> Oh how fun!
> 
> That’s not the kind of comment I would have written, because I can’t
> see how it could ever have been useful. Perhaps something more explanatory,
> like (wild guess)
> 
>         i += 2; /* increment occurrences */
> 
> and then the reader looks at the surrounding code to see what exactly
> are the “occurrences” being counted up, and that either confirms that
> 2 is the right number to add, or it does not.

That's just because you've stopped learning programming languages.  You
should take up Rust one of these days.

Then you can find yourself writing comments like

   /* functions need to start with fn, */

until you remember it.  You see, functions don't start with fn in C, nor
Fortran.

And I personally don't understand why people are harping on that stu-
dents shouldn't comment the obvious, because it isn't obvious to them
because they haven't memorized the syntax yet.

Of course, we /shouldn't/ have such code in production, but that's man-
agerial problem.  Some managers are fine with student written code, and
vibe code.  That's their problem.  Especially when it stops working.
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon
#135
Author: Johann 'Myrkraverk' Oskarsson
Date: Thu, 22 Oct 2026 01:51
38 lines
3651 bytes
On 10/22/2026 2:48 AM, boltar@battlestar.co.uk wrote:
> On Wed, 21 Oct 2026 20:26:29 +0200
> David Brown <david.brown@hesbynett.no> wrote:
>> On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
>>> Take a look around you. How many new startups are recruiting C++ devs?
>>>
>>
>> We see it all the time.  Of course, different programming fields want 
>> different languages - C++ is suitable for some things, and less so for 
>> other things.  There is no one language to fit all usage.
>>
>> There's plenty I don't like about C++ too.  But I don't have some 
>> weird conspiracy theory about how it is being destroyed by some ivory 
>> tower academics that want C++ to be hard so that they can look smart, 
>> or whatever your delusions are.
> 
> Not sure why you think its conspiracy anything. I use the language on a
> daily basis and everytime a new version comes out I hope they've added
> something useful but since 2014 its been a law of diminishing returns.
> Plus there's unexplained omissions - eg threads have been part of the core
> language since 2011. Great, but what about processes? When do we get them?
> Sure, I could just use fork() but then I could also just use 
> pthread_create()
> too.

There are what, three process models to wrap up?  The Unix/Linux model,
the N.T. model, and OpenVMS.

If you need anything too different from those three, you can just fail
with a compilation error on #include <process> or whatever.

It isn't too hard to create a modern abstraction that does mostly the
right thing.
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon
#136
Author: Lawrence D’Oliveiro
Date: Thu, 22 Oct 2026 02:00
12 lines
2268 bytes
On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:

> On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence D’Oliveiro wrote:
> 
>> The principle applies to Fortran as it does to any language where you
>> have to explicitly manage storage allocations.
> 
> Fortran 77 does not have dynamic memory allocation.  So, again,
> how *exactly* does using GOTO to break out of a Fortran 77 do
> loop require cleanup?

Read that again: “explicitly manage storage allocations”.
Re: “The end of software secrecy is almost upon
#137
Author: Steven G. Kargl
Date: Thu, 22 Oct 2026 02:17
32 lines
2709 bytes
On Thu, 22 Oct 2026 02:00:29 -0000 (UTC), Lawrence D’Oliveiro wrote:

> On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:
> 
>> On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence D’Oliveiro wrote:
>> 
>>> The principle applies to Fortran as it does to any language where you
>>> have to explicitly manage storage allocations.
>> 
>> Fortran 77 does not have dynamic memory allocation.  So, again,
>> how *exactly* does using GOTO to break out of a Fortran 77 do
>> loop require cleanup?
> 
> Read that again: “explicitly manage storage allocations”.

Sure, what is the EXACT clean up that you envision?  Here's some
good old Fortran 77

c234567
      INTEGER I(100)
      DO 10 N = 1, 100
      I(N) = I
      IF (N .EQ. 42) GOTO 11
10    CONTINUE
11    CONTINUE
      PRINT *, N
      END

What is the clean-up?  Your goal post seem to move.

-- 
steve
Re: “The end of software secrecy is almost upon
#138
Author: Johann 'Myrkraverk' Oskarsson
Date: Thu, 22 Oct 2026 03:05
22 lines
2268 bytes
On 10/22/2026 8:37 AM, Lawrence D’Oliveiro wrote:
> On 21 Oct 2026 16:02:16 GMT, Ted Nolan <tednolan> wrote:
> 
>> A co-worker actually tracked down such an issue. It turned out that
>> in certain cases of misuse of indirection, you could assign new
>> values to constants, such that '2' might have the value 1.
> 
> Certain early Fortran implementations. Couldn’t happen in any other
> language ...

Did you never experiment with

   const int i = 3 ;
   int *p = &i ;
   *p = 1 ;

in C, as a student?
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon
#139
Author: Peter Flass
Date: Thu, 22 Oct 2026 03:07
13 lines
2156 bytes
On 10/21/26 17:37, Lawrence D’Oliveiro wrote:
> On 21 Oct 2026 16:02:16 GMT, Ted Nolan <tednolan> wrote:
> 
>> A co-worker actually tracked down such an issue. It turned out that
>> in certain cases of misuse of indirection, you could assign new
>> values to constants, such that '2' might have the value 1.
> 
> Certain early Fortran implementations. Couldn’t happen in any other
> language ...

Probably called a subroutine with constant 2 as an argument, which the 
subroutine modified. I don't think FORTRAN used dummy arguments or 
call-by-value.
Re: “The end of software secrecy is almost upon
#140
Author: Thomas Koenig
Date: Thu, 22 Oct 2026 03:46
37 lines
3118 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> schrieb:
> On Wed, 21 Oct 2026 13:27:48 -0000 (UTC), Thomas Koenig wrote:
>
>> Lawrence D’Oliveiro <ldo@nz.invalid> schrieb:
>>>
>>> On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
>>>
>>>> On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>>>
>>>>> On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
>>>>>
>>>>>> ** The setting a flag method which has to be checked in every
>>>>>>    nested loop test is just an [asinine] way to code.
>>>>>
>>>>> If you have to do cleanup at each level before exiting, then it
>>>>> works perfectly well.
>>>>
>>>> It may well work but it doesn't make it good. Its harder to follow
>>>> - whereas a goto out of a deeply nested loops is blindingly
>>>> obvious - and its less efficient.
>>>
>>> The goto from the deep inner block to the outer one is “blindingly
>>> obvious” ... ly wrong.
>>>
>>> What about the cleanup?
>>
>> What cleanup, exactly?  We are talking Fortran, remember.
>
> The principle applies to Fortran as it does to any language where you
> have to explicitly manage storage allocations.

DO loops do not introduce scope in Fortran.

-- 
This USENET posting was made without artificial intelligence,
artificial impertinence, artificial arrogance, artificial stupidity,
artificial flavorings or artificial colorants.
Re: “The end of software secrecy is almost upon
#141
Author: Ted Nolan <tednolan>
Date: Thu, 22 Oct 2026 04:22
15 lines
1550 bytes
In article <11bblrj$du80$5@dont-email.me>,
Lawrence DĂżOliveiro  <ldo@nz.invalid> wrote:
>On 21 Oct 2026 16:02:16 GMT, Ted Nolan <tednolan> wrote:
>
>> A co-worker actually tracked down such an issue. It turned out that
>> in certain cases of misuse of indirection, you could assign new
>> values to constants, such that '2' might have the value 1.
>
>Certain early Fortran implementations. Couldn’t happen in any other
>language ...

Mumps.
-- 
columbiaclosings.com
What's not in Columbia anymore..
Re: “The end of software secrecy is almost upon
#142
Author: Steven G. Kargl
Date: Thu, 22 Oct 2026 04:33
36 lines
3128 bytes
On Thu, 22 Oct 2026 03:35:07 -0000 (UTC), Lawrence D’Oliveiro wrote:

> On Thu, 22 Oct 2026 02:17:59 -0000 (UTC), Steven G. Kargl wrote:
> 
>> On Thu, 22 Oct 2026 02:00:29 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>
>>> On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:
>>>
>>>> On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>>
>>>>> The principle applies to Fortran as it does to any language where
>>>>> you have to explicitly manage storage allocations.
>>>>
>>>> Fortran 77 does not have dynamic memory allocation. So, again, how
>>>> *exactly* does using GOTO to break out of a Fortran 77 do loop
>>>> require cleanup?
>>>
>>> Read that again: “explicitly manage storage allocations”.
>>
>> Sure, what is the EXACT clean up that you envision?
> 
> “Storage allocations”.

There isn't any "storage allocation" to cleanup.  Of course,
it would help if you actually define what you mean by "storage
allocation".  I gave you an example of Fortran 77 code where
a GOTO jumps out of a do-loop.  There is nothing to cleanup.

So, please define "storage allocation" in the context of
the Fortran language, and then define EXACTLY what you 
mean by cleanup.

-- 
steve
-- 
steve
Re: “The end of software secrecy is almost upon
#143
Author: Lawrence D’Oliveiro
Date: Thu, 22 Oct 2026 04:50
28 lines
2950 bytes
On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:

> On Thu, 22 Oct 2026 03:35:07 -0000 (UTC), Lawrence D’Oliveiro wrote:
>
>> On Thu, 22 Oct 2026 02:17:59 -0000 (UTC), Steven G. Kargl wrote:
>>
>>> On Thu, 22 Oct 2026 02:00:29 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>
>>>> On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:
>>>>
>>>>> On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>>>
>>>>>> The principle applies to Fortran as it does to any language
>>>>>> where you have to explicitly manage storage allocations.
>>>>>
>>>>> Fortran 77 does not have dynamic memory allocation. So, again,
>>>>> how *exactly* does using GOTO to break out of a Fortran 77 do
>>>>> loop require cleanup?
>>>>
>>>> Read that again: “explicitly manage storage allocations”.
>>>
>>> Sure, what is the EXACT clean up that you envision?
>>
>> “Storage allocations”.
>
> There isn't any "storage allocation" to cleanup.

Not in your example. Which is why it was irrelevant.
Re: “The end of software secrecy is almost upon
#144
Author: Lawrence D’Oliveiro
Date: Thu, 22 Oct 2026 04:51
37 lines
3119 bytes
On Thu, 22 Oct 2026 03:46:30 -0000 (UTC), Thomas Koenig wrote:

> Lawrence D’Oliveiro <ldo@nz.invalid> schrieb:
>>
>> On Wed, 21 Oct 2026 13:27:48 -0000 (UTC), Thomas Koenig wrote:
>>
>>> Lawrence D’Oliveiro <ldo@nz.invalid> schrieb:
>>>>
>>>> On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
>>>>
>>>>> On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>>>>
>>>>>> On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
>>>>>>
>>>>>>> ** The setting a flag method which has to be checked in every
>>>>>>>    nested loop test is just an [asinine] way to code.
>>>>>>
>>>>>> If you have to do cleanup at each level before exiting, then it
>>>>>> works perfectly well.
>>>>>
>>>>> It may well work but it doesn't make it good. Its harder to
>>>>> follow - whereas a goto out of a deeply nested loops is
>>>>> blindingly obvious - and its less efficient.
>>>>
>>>> The goto from the deep inner block to the outer one is
>>>> “blindingly obvious” ... ly wrong.
>>>>
>>>> What about the cleanup?
>>>
>>> What cleanup, exactly?  We are talking Fortran, remember.
>>
>> The principle applies to Fortran as it does to any language where
>> you have to explicitly manage storage allocations.
>
> DO loops do not introduce scope in Fortran.

Nobody said anything about “scope”.
Re: “The end of software secrecy is almost upon
#145
Author: Steven G. Kargl
Date: Thu, 22 Oct 2026 04:56
25 lines
2613 bytes
On Thu, 22 Oct 2026 04:50:10 -0000 (UTC), Lawrence D’Oliveiro wrote:

> On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:
> 
>>>>
>>>> Sure, what is the EXACT clean up that you envision?
>>>
>>> “Storage allocations”.
>>
>> There isn't any "storage allocation" to cleanup.
> 
> Not in your example. Which is why it was irrelevant.

Then give a Fortran 77 example that requires cleanup.
You can't, can you?

Using GOTO to jump out of do-loop in Fortran 77 does 
not lead to some mysterious "storage allocation" to
cleanup.

PS: a smart compiler would actually not generate code
to execute the do-loop for the code in my example.

-- 
steve
Re: “The end of software secrecy is almost upon
#146
Author: Johann 'Myrkraverk' Oskarsson
Date: Thu, 22 Oct 2026 06:22
26 lines
2761 bytes
On 10/22/2026 11:07 AM, Peter Flass wrote:
> On 10/21/26 17:37, Lawrence D’Oliveiro wrote:
>> On 21 Oct 2026 16:02:16 GMT, Ted Nolan <tednolan> wrote:
>>
>>> A co-worker actually tracked down such an issue. It turned out that
>>> in certain cases of misuse of indirection, you could assign new
>>> values to constants, such that '2' might have the value 1.
>>
>> Certain early Fortran implementations. Couldn’t happen in any other
>> language ...
> 
> Probably called a subroutine with constant 2 as an argument, which the 
> subroutine modified. I don't think FORTRAN used dummy arguments or call- 
> by-value.

Reminds me of a bit of Elisp I wrote in XEmacs.  Someone complained it
modified -- or tried to modify? -- the literal array (?) I had when us-
ing GNU Emacs.  It's been a while.  Anyway, I never experienced it as a
bug, and I suppose there was a difference in implementation.

So no, it's not just /early Fortran/.
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon
#147
Author: Johann 'Myrkraverk' Oskarsson
Date: Thu, 22 Oct 2026 06:34
34 lines
3068 bytes
On 10/22/2026 12:56 PM, Steven G. Kargl wrote:
> On Thu, 22 Oct 2026 04:50:10 -0000 (UTC), Lawrence D’Oliveiro wrote:
> 
>> On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:
>>
>>>>>
>>>>> Sure, what is the EXACT clean up that you envision?
>>>>
>>>> “Storage allocations”.
>>>
>>> There isn't any "storage allocation" to cleanup.
>>
>> Not in your example. Which is why it was irrelevant.
> 
> Then give a Fortran 77 example that requires cleanup.
> You can't, can you?
> 
> Using GOTO to jump out of do-loop in Fortran 77 does
> not lead to some mysterious "storage allocation" to
> cleanup.
> 
> PS: a smart compiler would actually not generate code
> to execute the do-loop for the code in my example.
> 

Open Watcom Fortran 77 has /allocate/ and /deallocate/ according to a
quick glance at the manual, but I have never used them.

I guess the point is we don't want to allocate in a loop?
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon
#148
Author: Thomas Koenig
Date: Thu, 22 Oct 2026 06:39
48 lines
3601 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> schrieb:
> On Thu, 22 Oct 2026 03:46:30 -0000 (UTC), Thomas Koenig wrote:
>
>> Lawrence D’Oliveiro <ldo@nz.invalid> schrieb:
>>>
>>> On Wed, 21 Oct 2026 13:27:48 -0000 (UTC), Thomas Koenig wrote:
>>>
>>>> Lawrence D’Oliveiro <ldo@nz.invalid> schrieb:
>>>>>
>>>>> On Wed, 21 Oct 2026 07:42:30 -0000 (UTC), boltar wrote:
>>>>>
>>>>>> On Wed, 21 Oct 2026 01:29:18 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>>>>>
>>>>>>> On Tue, 20 Oct 2026 17:24:27 -0000 (UTC), boltar wrote:
>>>>>>>
>>>>>>>> ** The setting a flag method which has to be checked in every
>>>>>>>>    nested loop test is just an [asinine] way to code.
>>>>>>>
>>>>>>> If you have to do cleanup at each level before exiting, then it
>>>>>>> works perfectly well.
>>>>>>
>>>>>> It may well work but it doesn't make it good. Its harder to
>>>>>> follow - whereas a goto out of a deeply nested loops is
>>>>>> blindingly obvious - and its less efficient.
>>>>>
>>>>> The goto from the deep inner block to the outer one is
>>>>> “blindingly obvious” ... ly wrong.
>>>>>
>>>>> What about the cleanup?
>>>>
>>>> What cleanup, exactly?  We are talking Fortran, remember.
>>>
>>> The principle applies to Fortran as it does to any language where
>>> you have to explicitly manage storage allocations.
>>
>> DO loops do not introduce scope in Fortran.
>
> Nobody said anything about “scope”.

Somebody who knows the first thing about Fortran, which you
clearly don't, might have realized that scope is the only
way to mandate storage allocation/deallocation in Fortran.


-- 
This USENET posting was made without artificial intelligence,
artificial impertinence, artificial arrogance, artificial stupidity,
artificial flavorings or artificial colorants.
Re: “The end of software secrecy is almost upon
#149
Author: David Brown
Date: Thu, 22 Oct 2026 07:20
61 lines
4933 bytes
On 21/10/2026 20:48, boltar@battlestar.co.uk wrote:
> On Wed, 21 Oct 2026 20:26:29 +0200
> David Brown <david.brown@hesbynett.no> wrote:
>> On 21/10/2026 20:02, boltar@battlestar.co.uk wrote:
>>> Take a look around you. How many new startups are recruiting C++ devs?
>>>
>>
>> We see it all the time.  Of course, different programming fields want 
>> different languages - C++ is suitable for some things, and less so for 
>> other things.  There is no one language to fit all usage.
>>
>> There's plenty I don't like about C++ too.  But I don't have some 
>> weird conspiracy theory about how it is being destroyed by some ivory 
>> tower academics that want C++ to be hard so that they can look smart, 
>> or whatever your delusions are.
> 
> Not sure why you think its conspiracy anything. 

When a group of people or entities are working together with a secret 
agenda that is opposing (or at least independent of) their claimed open 
agenda, that's a conspiracy.  The phrase "conspiracy theory" is usually 
applied when someone believes their is a conspiracy without suitable 
evidence or justification.

Thus your opinion of the C++ standards committee's work and motivation 
is a conspiracy theory.  It's not a remotely dangerous one - but it is 
still a daft one.

This is very different from simply saying that you haven't found much 
use for the features added to the C++ language or library in recent 
years, or that you find the new features more complex than they are 
worth, or that you are disappointed that features you hoped for were not 
added.  That would be an entirely legitimate opinion based on personal 
preferences, experiences and needs.

> I use the language on a
> daily basis and everytime a new version comes out I hope they've added
> something useful but since 2014 its been a law of diminishing returns.

That is inevitable, and applies to all languages.  Big, established 
languages already cover most needs of most users.  /No one/ uses all the 
features of C++, or Python, or Java.  No one is interested in /all/ the 
new features they gain.  That does not mean they can't evolve and 
improve.  If I look at Wikipedia's list of what is new in C++20, there 
are about 20 language changes and 15 major library changes.  I use 
perhaps 4 or 5 of these, and am somewhat interested in a couple more. 
For C++23, the list of changes is much longer, but there is only one 
that made me change to -std=gnu++23.  But for a much larger proportion 
of the changes, I can understand how they could be useful to other people.

> Plus there's unexplained omissions - eg threads have been part of the core
> language since 2011. Great, but what about processes? When do we get them?
> Sure, I could just use fork() but then I could also just use 
> pthread_create()
> too.

Equally, no language can support all the features that users might want.

For the particular case of why C++ supports threads but not processes, 
the answer should be obvious.
Re: “The end of software secrecy is almost upon
#150
Author: Steven G. Kargl
Date: Thu, 22 Oct 2026 07:31
60 lines
4065 bytes
On Thu, 22 Oct 2026 14:34:20 +0800, Johann 'Myrkraverk' Oskarsson wrote:

> On 10/22/2026 12:56 PM, Steven G. Kargl wrote:
>> On Thu, 22 Oct 2026 04:50:10 -0000 (UTC), Lawrence D’Oliveiro wrote:
>> 
>>> On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:
>>>
>>>>>>
>>>>>> Sure, what is the EXACT clean up that you envision?
>>>>>
>>>>> “Storage allocations”.
>>>>
>>>> There isn't any "storage allocation" to cleanup.
>>>
>>> Not in your example. Which is why it was irrelevant.
>> 
>> Then give a Fortran 77 example that requires cleanup.
>> You can't, can you?
>> 
>> Using GOTO to jump out of do-loop in Fortran 77 does
>> not lead to some mysterious "storage allocation" to
>> cleanup.
>> 
>> PS: a smart compiler would actually not generate code
>> to execute the do-loop for the code in my example.
>> 
> 
> Open Watcom Fortran 77 has /allocate/ and /deallocate/ according to a
> quick glance at the manual, but I have never used them.

Dynamic memory management via allocate/deallocate was introduce
in Fortran 90.  Open Watcom Fortran 77 may have added those as
an extension.  The Fortran 77 standard does have a dynamic memory
feature.  But, this seems irrelevant to Lawrence, who has coined
the term "storage allocation", which is not Fortran terminology.
We are now waiting for a definition for this term.

> I guess the point is we don't want to allocate in a loop?

I allocate memory in do-loops all time.  It would be a significant
pessimization to write something like

   integer, allocatable :: i(:)
   i = [0]               ! A 1-element array.
   do j = 1, 9
     i = [i,j]           ! Re-allocate i on assignment
   end do
10 print *, i
   end

Note, there is no clean up of 'storage allocation' when the
loop terminates.  The Fortran standard does not mandate when
memory that may have been freed during the re-allocation is
actually garbaged collected.  The program could return memory
to the system during the re-allocation or when the program
terminates.

-- 
steve
Re: “The end of software secrecy is almost upon
#151
Author: Johann 'Myrkraverk' Oskarsson
Date: Thu, 22 Oct 2026 08:40
78 lines
4899 bytes
On 10/22/2026 3:31 PM, Steven G. Kargl wrote:
> On Thu, 22 Oct 2026 14:34:20 +0800, Johann 'Myrkraverk' Oskarsson wrote:
> 
>> On 10/22/2026 12:56 PM, Steven G. Kargl wrote:
>>> On Thu, 22 Oct 2026 04:50:10 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>
>>>> On Thu, 22 Oct 2026 04:33:04 -0000 (UTC), Steven G. Kargl wrote:
>>>>
>>>>>>>
>>>>>>> Sure, what is the EXACT clean up that you envision?
>>>>>>
>>>>>> “Storage allocations”.
>>>>>
>>>>> There isn't any "storage allocation" to cleanup.
>>>>
>>>> Not in your example. Which is why it was irrelevant.
>>>
>>> Then give a Fortran 77 example that requires cleanup.
>>> You can't, can you?
>>>
>>> Using GOTO to jump out of do-loop in Fortran 77 does
>>> not lead to some mysterious "storage allocation" to
>>> cleanup.
>>>
>>> PS: a smart compiler would actually not generate code
>>> to execute the do-loop for the code in my example.
>>>
>>
>> Open Watcom Fortran 77 has /allocate/ and /deallocate/ according to a
>> quick glance at the manual, but I have never used them.
> 
> Dynamic memory management via allocate/deallocate was introduce
> in Fortran 90.  Open Watcom Fortran 77 may have added those as
> an extension.  The Fortran 77 standard does have a dynamic memory
> feature.  But, this seems irrelevant to Lawrence, who has coined
> the term "storage allocation", which is not Fortran terminology.
> We are now waiting for a definition for this term.

Lawrence, in my experience, pretends to be a much more experienced pro-
grammer than he is.  In my opinion, he's just a Python influencer.

So we keep waiting.

> 
>> I guess the point is we don't want to allocate in a loop?
> 
> I allocate memory in do-loops all time.  It would be a significant
> pessimization to write something like
> 
>     integer, allocatable :: i(:)
>     i = [0]               ! A 1-element array.
>     do j = 1, 9
>       i = [i,j]           ! Re-allocate i on assignment
>     end do
> 10 print *, i
>     end
> 
> Note, there is no clean up of 'storage allocation' when the
> loop terminates.  The Fortran standard does not mandate when
> memory that may have been freed during the re-allocation is
> actually garbaged collected.  The program could return memory
> to the system during the re-allocation or when the program
> terminates.
> 

Thanks.  I admit some lacking in understanding of Fortran, 77 and other-
wise, so I'll read better upon this stuff before I start to use it.

In other news, I have no problem understanding the Fortran 77 code snip-
pets in my /Digital Image Processing/ (1993) by Gonzales and Woods.
Sometimes code literacy is sufficient.

Best wishes, and happy Fortran!
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Re: “The end of software secrecy is almost upon
#152
Author: Peter Flass
Date: Thu, 22 Oct 2026 14:26
25 lines
2931 bytes
On 10/21/26 20:35, Lawrence D’Oliveiro wrote:
> On Thu, 22 Oct 2026 02:17:59 -0000 (UTC), Steven G. Kargl wrote:
> 
>> On Thu, 22 Oct 2026 02:00:29 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>
>>> On Thu, 22 Oct 2026 01:16:25 -0000 (UTC), Steven G. Kargl wrote:
>>>
>>>> On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>>>
>>>>> The principle applies to Fortran as it does to any language where
>>>>> you have to explicitly manage storage allocations.
>>>>
>>>> Fortran 77 does not have dynamic memory allocation. So, again, how
>>>> *exactly* does using GOTO to break out of a Fortran 77 do loop
>>>> require cleanup?
>>>
>>> Read that again: “explicitly manage storage allocations”.
>>
>> Sure, what is the EXACT clean up that you envision?
> 
> “Storage allocations”.

That's why I try to use PL/I AUTOMATIC (stack) storage and not allocate 
a lot of stuff. You need to have a disciplined approach if you allocate 
random stuff here and there.
Re: Re: “The end of software secrecy is almost upon
#153
Author: boltar
Date: Thu, 22 Oct 2026 14:50
24 lines
2503 bytes
On Wed, 21 Oct 2026 19:01:38 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
>In article <11bb1da$qfn9$1@dont-email.me>,  <boltar@battlestar.co.uk> wrote:
>>Not sure why you think its conspiracy anything. I use the language on a
>>daily basis and everytime a new version comes out I hope they've added
>>something useful but since 2014 its been a law of diminishing returns.
>>Plus there's unexplained omissions - eg threads have been part of the core
>>language since 2011. Great, but what about processes? When do we get them?
>>Sure, I could just use fork() but then I could also just use pthread_create()
>>too. 
>
>One can implement a pretty reasonable threads library given the
>virtual machine model of standard C or C++.  Processes?  With

Virtual machine? Wrong language , comp.lang.java is that way --->

>their own address spaces, credentials, resource limits, IPC
>mechanisms, potentially running different programs, and so on?
>
>Not so much.  You need an operating system for that, son.

You need an OS to do threading properly too. Theres a reason green threads
in java were a joke.
Re: Re: “The end of software secrecy is almost upon
#154
Author: boltar
Date: Thu, 22 Oct 2026 14:51
32 lines
2858 bytes
On Wed, 21 Oct 2026 14:12:47 -0700
Peter Flass <Peter@Iron-Spring.com> wrote:
>On 10/21/26 10:50, boltar@battlestar.co.uk wrote:
>> On Wed, 21 Oct 2026 11:06:19 -0400 (EDT)
>> kludge@panix.com (Scott Dorsey) wrote:
>>> In article <11b9qna$pqb8$1@dont-email.me>,  <boltar@battlestar.co.uk> wrote:
>
>>>> David Brown <david.brown@hesbynett.no> wrote:
>>>>> And people /do/ use concepts, even if you do not.
>>>>
>>>> Yeah, on university CS courses. They're just more metaprogramming fucking
>>>> about and add nothing of actual value for the jobbing programmer trying to
>>>> solve a problem.
>>>
>>> I kind of thought that way once.  Then I worked with someone who decided
>>> to solve a problem that was NP-hard.  I mentioned to him, "you know this is
>>> NP-hard, you'll never make it work for a reasonable number of elements"
>>> but he was convinced there was a solution.  He worked on it for about a year
>
>>> before getting fired.
>> 
>> I've no idea what point you're trying to make there.
>
>He's trying to say that his university CS work paid off.
>
>I agree that the work for a CS degree is useful. If nothing else I 
>understand more now.

Most of us have a CS degree. But then we go out into the real world, get a
job and find out what real programming on real products entails, not a load
of virtual academic naval gazing.
Page 3 of 11 • 514 total messages
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