[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simplified Python caching
From: |
Collin Funk |
Subject: |
Re: Simplified Python caching |
Date: |
Tue, 16 Apr 2024 09:41:00 -0700 |
User-agent: |
Mozilla Thunderbird |
Hi Bruno,
On 4/16/24 8:47 AM, Bruno Haible wrote:
> Yes, they _can_ be made static, but they can also be left as-is. And so,
> as a developer, you start to spend time considering whether to make a
> function static or not. That time is not well spent.
We are in agreement there. PyCharm gives hints that you can make
function static, but I ended up turning it off. That case was an easy
example, but there is little benefit. In the first line of main we
have 'info = GLInfo()' which is clear enough.
> When a programmer, each time they define a function, they consider which
> of the 13 variants is suitable or the best, they spend time on a thing
> that is not necessary for the functioning of their program.
LOL, that is a good example. I can't tell if there are any you missed
because I haven't used C++ in ~5 years.
> A workaround is to move the loop into a function, and then use
> 'return' from different locations.
True, I'll get around to fixing that break eventually. Atleast Python
is fast enough that it doesn't really matter in the grand scheme of
things.
Collin