Deutsch   English   Français   Italiano  
<vhq1f7$16bou$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Pancho <Pancho.Jones@proton.me>
Newsgroups: comp.os.linux.misc
Subject: Re: Joy of this, Joy of that
Date: Fri, 22 Nov 2024 13:37:43 +0000
Organization: A noiseless patient Spider
Lines: 81
Message-ID: <vhq1f7$16bou$1@dont-email.me>
References: <vhigot$1uakf$1@dont-email.me>
 <6iKdnTQOKNh6AqD6nZ2dnZfqn_idnZ2d@earthlink.com>
 <20241120081039.00006d2a@gmail.com> <vhlium$93kn$1@dont-email.me>
 <vhmprp$iaf1$1@dont-email.me>
 <LASdnSkA69I3yKL6nZ2dnZfqnPWdnZ2d@earthlink.com>
 <vhoeap$r8gq$2@dont-email.me> <vhpmq3$14s79$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 22 Nov 2024 14:37:44 +0100 (CET)
Injection-Info: dont-email.me; posting-host="a36b6143b3d24bc6978f336868c87ac8";
	logging-data="1257246"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19XvCYbsuHszObDjUS3DwSRxhgDD6JLP5M="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:IidD76mS/3PiLq0zdYCo0NY+2xY=
Content-Language: en-GB
In-Reply-To: <vhpmq3$14s79$2@dont-email.me>
Bytes: 4680

On 11/22/24 10:35, The Natural Philosopher wrote:
> On 21/11/2024 23:04, Pancho wrote:
>> On 11/21/24 15:45, 186282@ud0s4.net wrote:
>>> On 11/21/24 3:09 AM, Pancho wrote:
>>>> On 11/20/24 21:05, Rich wrote:
>>>>> John Ames <commodorejohn@gmail.com> wrote:
>>>>>> On Wed, 20 Nov 2024 03:37:58 -0500
>>>>>> "186282@ud0s4.net" <186283@ud0s4.net> wrote:
>>>>>>
>>>>>>> Hmmmmmmmm ... how many now have EVER programmed in BASIC ? Should do
>>>>>>> a survey .....
>>>>>>
>>>>>> Lord, who hasn't!? Well, probably depends on how you choose to 
>>>>>> qualify
>>>>>> it - we still use VB6 in-house at $EMPLOYER, and FreeBASIC is my 
>>>>>> go-to
>>>>>> for hacking together quick utility applications in daily life, but I
>>>>>> haven't touched old-school line-number spaghetti-Gotoese BASIC since
>>>>>> childhood, and certainly never built any application of real 
>>>>>> complexity
>>>>>> with it. Bet more than a few people here have, though, especially 
>>>>>> if we
>>>>>> cross-posted over to a.f.computers...
>>>>>
>>>>> Given the typical age of most posters here, I'd say nearly every 
>>>>> one of
>>>>> us has written /something/ in one or more of the 75 different variants
>>>>> of "BASIC" that have existed over time.
>>>>>
>>>>
>>>> For me: BBC Basic, VAX Basic, Visual Basic (&VBA).
>>>>
>>>> GOTO was deprecated before BBC Basic circa 1981. I never really saw 
>>>> it, apart from reasonable GOTO error usages. Wasn't it more a sign 
>>>> of lack of training than a linguistic feature?
>>>
>>>    I found a good way to use GOTO however - in a handheld
>>>    device where you had to enter several kinds of data
>>>    about a location. The structure was a sort of "ladder"
>>>    and pressing buttons would take you up and down the
>>>    ladder via GOTOs. If you needed to edit yer last entry
>>>    you just jumped one step up. The handheld only had a
>>>    4-line display alas, so you couldn't show even one
>>>    entire record, only one prompt at a time.
>>>
>>>    Now each entry was only a few lines of code - the input,
>>>    an error-detector and the up/down GOTO thing. Easy to
>>>    keep track of. GOTO made the pgm simpler and more
>>>    compact.
>>
>> Sounds like a jump table. We still do that, but with functions rather 
>> than jumps.
>>
> Case statements...
> 
In OO, switch/case statements were deprecated too :-) I can't remember 
exactly why. I think it was because we were supposed to use polymorphism 
instead.

In practical project terms, giant switch statements were a pain in the 
bum, because everyone would constantly be modifying that bit of code and 
you would get source code merge conflicts.

It's coming back to me, VAX BASIC programs would be designed to consist 
of a massive "do processing" loop, which would consist of a big switch 
statement containing a case for every type of report or behaviour the 
program was supposed to handle. Every time a new report was added, the 
switch had a case added.

Then it reminds me of the Gang of Four visitor pattern, every time I saw 
it, it took me a whole morning's thinking energy to understand that it 
was just a simple switch :-).

Coding is always a balance between flexibility and clarity, there is no 
"right" answer. You can make code more flexible by adding another layer 
of indirection, but it becomes harder to understand.