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 <vapp91$3v4l8$3@dont-email.me>
Deutsch   English   Français   Italiano  
<vapp91$3v4l8$3@dont-email.me>

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

Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Python (was Re: I did not inhale)
Date: Thu, 29 Aug 2024 14:24:01 +0200
Organization: A noiseless patient Spider
Lines: 113
Message-ID: <vapp91$3v4l8$3@dont-email.me>
References: <uu54la$3su5b$6@dont-email.me> <v9m4gd$14scu$1@dont-email.me>
 <20240815182717.189@kylheku.com> <v9npls$1fjus$1@dont-email.me>
 <v9t204$2dofg$1@dont-email.me> <va28pi$3dldm$1@dont-email.me>
 <va2ro9$3gd7v$1@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 29 Aug 2024 14:24:02 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="737b96d1a4f94365fbc2f60b2f2e5810";
	logging-data="4166312"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX193drDaJzsQfWCmB1nHVYBGO1BiCUcPJU4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.11.0
Cancel-Lock: sha1:t5Tcka/KbY/fItv6PZI+MDMA7Hw=
Content-Language: en-GB
In-Reply-To: <vantnp$3j94i$1@dont-email.me>
Bytes: 7010

On 28/08/2024 21:27, Bart wrote:
> 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.

If I am adding or removing blocks (such as surrounding existing code in 
a new conditional), then I /have/ to change the indentation - in /any/ 
language.  (I use indents in my assembly programming too.)  Call it OCD 
or compulsive behaviour if you like, but I cannot consider code to be 
finished - even to the level of a quick compile or test - if the 
indentation is not correct.

I simply cannot see the problem with Python here, because I would not 
indent things in any other way in any language.

The only thing I see as annoying in Python is when you have two or three 
indentations left hanging :

def foo(a, b, c) :
	if a :
		if b :
			if c :
				doThis()

That looks unfinished to me.  So I will add a "return" at the end (with 
a single tab indent, in this case).  If it is not the end of the 
function, I will sometimes use a "pass" to pull back the indent level.


> A lesser one 
> is having to rely on whatever varied features that 100s of different 
> editors may have to do so.

I also rely on editors being able to accept keypresses, to load and save 
files, and to have features like "search".

Of course, being a sane software developer, I do most of my programming 
using editors that are suitable for software development.  Most 
professional carpenters use hammers for their nails, rather than bashing 
them in with stones - it's the same thing, really.

> 
> 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.
> 

So mark the boundary.  Add a blank line.  Put a comment line describing 
the steps of the function.  You are making up problems for which you 
already have good solutions that you would be using in any programming 
language.

> 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.
> 

Having made your own language(s) gives you no more and no less right to 
comment about features of other languages that you like or dislike.

Your problem here is that you are obsessed with finding things that you 
want to see as misfeatures, design flaws, or problems in other languages 
- and then obsess about how you can find new ways to make it more 
difficult to "work around" them.

Don't you ever just accept that a language is the way it is, and it is 
perfectly useable that way?  Or think that perhaps other people in the 
world know better than you do about how they want their language to 
work?  Has it never occurred to you that the people behind a given 
language - such as Python - considered various alternatives and decided 
that making it the way they did was the best choice overall for the 
language they wanted?

As Bjarne Stustroup said, there are two kinds of programming languages - 
those that people complain about, and those that no one uses.