On 12/6/19 11:08 AM, Michael wrote:
On 03/12/2019 17:15, Mark Shannon wrote:
Hi Everyone,
I am proposing a new PEP, still in draft form, to impose a limit of one million on various aspects of Python programs, such as the lines of code per module.
Any thoughts or feedback?
The PEP: https://github.com/markshannon/peps/blob/one-million/pep-1000000.rst
Cheers, Mark. Shortened the mail - as I want my comment to be short. There are many longish ones, and have not gotten through them all.
One guiding principle I learned from a professor (forgot his name sadly).
A program has exactly - zero (0) of something, one (1) of something, or infinite. The moment it gets set to X, the case for X+1 appears.
Since we are not talking about zero, or one - I guess my comment is make sure it can be used to infinity.
Regards,
Michael
p.s. If this has already been suggested - my apologies for any noise.
The version of this philosophy that I have heard is normally: Zero, One, Many, or sometimes Zero, One, Two, Many, and occasionally Zero, One, Two, Three, Many. The Idea is that the handling of Zero of something is obviously a different case from having some of it. Having Just One of something often can be treated differently than multiple of it, and sometimes it makes sense to only allow 1 of the thing. Sometimes, having just Two of the things allows for some useful extra interactions, and can be simpler than an arbritary number, so sometimes you can allow just two, but not many. Similarly, there are some more rare cases where maybe allowing just 3 and not more can make sense. In general, for larger values, if you allow M, then there isn't a good reason to not allow M+1 (until you hit practical resource limits). I wouldn't extend that to 'infinity' as there is a big catagorical difference between an arbitrary 'many' and 'infinite', as computers being finite machines CAN'T actually have infinite of something without special casing it. (and if you special case infinite, you might not make the effort handle large values of many). -- Richard Damon