I think it is completely by what you are taught, as I am the complete opposite. (I think snake case is ugly)
I say camelCase as the way it’s formatted, is that just me?
I prefer camelCase rather than snake_case because the underscores are just a bit annoying, only use it when I want to leave myself a mental note for a variable.
I will occasionally use snake_case or (Is this a thing?) snake_Camel, but I usually just use camelCase.
<small>I'm small :)</small>
There is an agreed standard for every language and for python it is PEP8.
Do you need to use it? No.
Why should you use it? If you work with others as most likely they will use also PEP8 (or some other internal format) and you would like to have consistent code.
what is PEP8 and how have I never heard of it.
I’m not very likely to use it lol
I mean, they might use it, but until now I didn’t even know that PEP8 exists (thus what it is) so what are the chances that they will know either.
Consistency goes from person to person as to what they think is “consistent”
No idea why you never heard of it ?
“Use 4 spaces per indentation level.”
No, I refuse to read anything else.
If you work in professional team you will need to adopt a standard.
If you want to work on open source, you need to use a standard.
Generally that is PEP8 for python, other languages have other styling standard. I started using it once i realise other people needed to use my code … till then I could not care less.
Please DO NOT USE TABS!!!
PS: your IDE is turning them in spaces most likely anyhow
Yeah, I get that I would need one then, but rn I do it pretty much as a hobby
I wouldn’t call it a necessity, perhaps a strong recommendation.
P.S.: @whileTRUEpass I like ur pfp
Main thing is, if you program as hobby, you can do what you want and have fun … i mean, i have been forced to change eventually (and suffer when i change language as i mix and match till my old brain remembers the proper styling).
PS: I am QWERT pain with my spelling mix ups … even if i try to fix them.
Why not? I thought using tabs rather than spaces takes up less bytes? even if it does replace it with spaces then…why does it matter if I do or don’t?
Only thing I can advice is to never enter such discussion, some people are very religious about it (not me)
9 posts were split to a new topic: Manually indent code?
Using spaces is simply just recommended over tabs
Camel case, of course
That might be hard for other languages, in nim the standard indentation size is 2, and I always have to switch it in my settings when switching between projects.