r/Python • • Jan 05 '18

Really??

Post image
2.0k Upvotes

317 comments sorted by

View all comments

Show parent comments

9

u/Astrokiwi Jan 05 '18

I'm only saying that it forces a bare minimum amount of structure that Python does not.

6

u/Keith Jan 05 '18

To be fair, you wrote "design your programs better". Forcing all code, object-oriented or not, into classes, one (public) class per file, is not strictly better. It's not even a structure I want. I'd argue that "bare minimum of structure" is harmful vs no structure at all.

6

u/Astrokiwi Jan 05 '18

Maybe... I find that (for instance) the lack of required structure is what helps Javascript code to sometimes become a mess of copypasta.

And Python does force stuff on another level, by being strict with indenting. I think that's a good feature too - it's better to force one particular style than to have people use their own styles, but also permit them to make it as ugly and inconsistent as they want.

4

u/fiddle_n Jan 05 '18

Python is strict with indenting because it has to be. Indentation isn't merely "style" in Python, it's functional in that it denotes a new code block. This is why Python has to be strict with it, i.e. preventing mixtures of tabs and spaces for indentation.

5

u/Astrokiwi Jan 05 '18

Right, but that's an intentional design choice for the language - forcing good style by making it an integral part of the language.