Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vao288$3k01j$1@dont-email.me>
Deutsch   English   Français   Italiano  
<vao288$3k01j$1@dont-email.me>

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

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bart <bc@freeuk.com>
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Python (was Re: I did not inhale)
Date: Wed, 28 Aug 2024 21:44:56 +0100
Organization: A noiseless patient Spider
Lines: 72
Message-ID: <vao288$3k01j$1@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <va2vt0$3h3gj$1@dont-email.me>
 <va44rh$3p1l6$1@dont-email.me> <va45eq$3pkt9$1@dont-email.me>
 <va4aut$3q4g0$1@dont-email.me> <va4fbr$3qvij$1@dont-email.me>
 <va5108$3tmmd$1@dont-email.me> <va51ok$3tqr9$1@dont-email.me>
 <va5ec2$3vluh$1@dont-email.me> <va6q4g$c1a7$1@dont-email.me>
 <va6rpa$c6bg$1@dont-email.me> <va6se9$cb8e$1@dont-email.me>
 <20240826083330.00004760@gmail.com> <vaises$2k7o6$2@dont-email.me>
 <20240826155113.000005ba@gmail.com> <wwvo75eicla.fsf@LkoBDZeT.terraraq.uk>
 <vak9k9$2ujrs$1@dont-email.me> <valgpu$34s18$1@dont-email.me>
 <vannkg$3ig72$1@dont-email.me> <vanrd8$3j0vv$1@dont-email.me>
 <vantnp$3j94i$1@dont-email.me> <87le0gbczf.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 28 Aug 2024 22:44:57 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1407973ec3a2d1c19c9aff4f00a8367c";
	logging-data="3801139"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX191y55pkuh0ceoyh+tynH7X"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:tw2oMOT8xQn77DQ65jsub/Yq21E=
In-Reply-To: <87le0gbczf.fsf@nosuchdomain.example.com>
Content-Language: en-GB
Bytes: 5273

On 28/08/2024 21:37, Keith Thompson wrote:
> Bart <bc@freeuk.com> writes:
>> On 28/08/2024 19:48, David Brown wrote:
>>> On 28/08/2024 19:43, Muttley@dastardlyhq.com wrote:
>>>> On Tue, 27 Aug 2024 21:34:54 -0000 (UTC)
>>>> Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>>>>> On Tue, 27 Aug 2024 11:26:18 +0100, Bart wrote:
>>>>>
>>>>>> (2) You want to temporarily comment out an 'if' line so that the
>>>>>> following block is unconditional. You can't do that with also
>>>>>> unindenting the block.
>>>>>
>>>>> In Emacs, I have commands defined to adjust the indentation of the
>>>>> selected region. Surely any other decent editor would offer the same.
>>>>
>>>> Writing editor editor macros in order to work around fundamentally bad
>>>> language design is not something a programmer should have to waste
>>>> time on.
>>>>
>>>>
>>> I don't know about Emacs, but in most editors the way you indent a
>>> block of code is to select the lines, then press "Tab".  Unindenting
>>> is "shift-Tab".  Changing tabs to spaces or spaces to tabs is done
>>> by selecting "Tabs to spaces" from the Edit menu, or something
>>> equally simple and obvious.  Many editor can be set to convert tabs
>>> to spaces (or vice versa) when saving files, perhaps specific to the
>>> file type (so you don't muck up your makefiles).
>>> It takes a special kind of genius to be able to program, and yet
>>> still have trouble with this kind of thing.
>>
>> The main problem isn't in changing the indentation of a block of code;
>> it is in HAVING to do so because of poor language design. A lesser one
>> is having to rely on whatever varied features that 100s of different
>> editors may have to do so.
>>
>> And yet another, of more significance, if that after you've indented a
>> block, it may now merge into an adjacent block that was already at
>> that new indent. If you later need to revert that first block back to
>> it's original position, you'd better make sure you mark that boundary.
>>
>> It is a language design issue pure and simple. Don't try and pin it on
>> the users and make out it's due to lack of expertise with their
>> editors. Of course we can all indent blocks; it's just an unnecessary
>> palaver.
>>
>> Clearly your point of view is as a language /user/ where languages and
>> their characteristics are an invariant that you can't do anything
>> about, can't change, and need to work around.
>>
>> But some of us devise (and, importanly, implement) languages of our
>> own and can be more vocal about misfeatures in others.
> 
> If I'm moving chunks of code around in a C or C++ program, from one
> scope to another, I can get away with leaving the indentation as it is,
> because all the compiler cares about is where the braces are.  But I
> *always* adjust the indentation to fit the code's new context.
> 
> Python's use of indentation to indicate scoping just means that I have
> to do what I would have done anyway.

If you glance at the top you will see that my original example involved 
/temparily/ commenting out the 'if' part of a conditional block. Another 
example was in temporarily /adding/ an 'if' around a block. And yet 
another (you might want to see my original longer post) was in adding in 
temporary code but deliberately not using the right indent to make it 
more visible.

You don't want to waste time getting the layout exactly right and then 
also risk that block disappearing into neighbouring code because 
everything is now at the same indent level.