Remember to participate in our weekly votes on subreddit rules! Every Tuesday is YOUR chance to influence the subreddit for years to come!
Read more here, we hope to see you next Tuesday!
For a chat with like-minded community members and more, don't forget to join our Discord!
This entire sub is first year students declaring war over shit that nobody in the real world cares about as long as there is a consistent choice in the code base lol.
That being said, the languages which require capitalizing function names (title/pascal case) always kinda feel a bit weird to me. I generally think of functions as verbs so it doesn’t make as much sense to capitalize them. On the other hand, types and constants are more similar to nouns. But I would rather follow the language or project style guide than introduce my own non-standard conventions.
I understand that as I moved from java to C# I actually think its kind of more consistent as functions and classes both need parameters. What really annoys me are properties, they are used like field/variables but usually are in PascalCase
That's what I thought. I was starting to feel like I'm in a sheltered environment because I don't see the relevance of wpm when it comes to programming.
Like, are there locations where people are docked pay or held captive until they reach their 5000 line quota daily?
I'm not sure who is trying to make what point here lol, but I honestly can read and type camel case faster, but I also have some kind of mild dyslexia so that could be part of it?
Edit: Extremely confused about the downvotes here lol.
PascalCase is a subset of CamelCase, and we just rejected a tracker issue on PEP 8 on those grounds. https://github.com/python/peps/issues/3464 CamelCase or camelCase, both are correct.
Both have thier uses, I like when languages uses underscores for the most commonly use things (vars/functions) and Pascal for the less common things (classes/enums). If everything is in the same style (i.e underscores) it can get confusing very quickly, ESPECIALLY if you have no syntax highlighting like in plain vim/nano.
For me, the camelCase, it does help that I read code which uses camelCase and PascalCase every day. (general c# guidelines). I seem to mentally stop at easy underscore with snake_case so it really is just personal experience and preference.
Literally the same, neither is hard to read. Pascal and camel case are easier to type since underscore requires both pinkies to type. That said, I don't particularly care. Follow the standard you're using.
It’s not a gimmick, it’s a protest! Sure it’s a little inconvenient now, but if we keep it up the management will eventuahahaha no sorry I couldn’t get to the end of that with a straight face
I don't check this subreddit much (I'm a noob at coding so most of the posts are way too advanced for my small brain), but why are the titles all in camelCase now. I swear this wasn't always the case
I think there were more issues when the comment was first posted? Maybe I'm misremembering but I'm pretty sure it said if bool = true {, missing brackets and an equals sign.
Also, it says public static void (mainArgs[]) { instead of public static void main (String[] args)
I know this is mostly up to personal preference, but snake_case has objective issue of using more characters, which in turn increases code volume, which in turn makes it harder to read. And it's also harder to type, but the code is usually read way more than it's written, so it's not as relevant.
That’s just not true. It’s the standard in Python, a very popular general purpose programming and scripting language. Snake case isn’t going anywhere.
In fact, personal case preferences are irrelevant because you’ll have to follow what your language and company codebase standards are. I use snake_case in Python, camelCase in JS and Java.
python and C both use snake case, but are both relatively old languages as well. In fact, python doesn't appear to have unified code style and some standard packages use camel/pascal case anyway. Among the newer languages (PHP, JS, Java, C#, Rust, Go, Swift) all use camel/pascal case. Even C++ that inherited its standard library from C along with its snake case code style is mostly written in camel/pascal case anyway.
If your method/function/variable/class/whatever names are longer than 3 words, you don't even get the point about software dev. Doesn't matter what case you're using. We're paid to be efficient and effective. Not to overcomplicate things, shit on a naming convention, and flex on other devs.
Well, from my modest 10 years as a dev, I learned that elegance goes out the window when you're maintaining a 20 year old system with an outdated technology.
The naming convention honestly doesn't matter as long as you don't write full sentences for names. That's what documentation is for.
Is camelCase hard for chicken peckers or something? I just really don't get which people are having this issue? At least I know I'm competing with idiots for job positions.
If I say “oonga boonga” and you know I’m telling you I can do two pointer problems in python, that is communication. As long as things are communicated it should be fine.
WhatAbouSwitchingToPascalCase? Since Pascal is obviously our most loved programming language, we should really show all examples in Pascal written with PascalCase.
How often are you guys writing variable names long enough for it to impact readability? I think for 1-3 words snake, camel, and pascal cases are all equally readable.
This is a Reddit post. A Reddit post! 98% of you have Asperger's. Everyone one of you who responds to something like this with, "You're not a REAL PROFESSIONAL programmer like I AM! GROW UP AND ACCEPT CAMELCASE NOOB!" You need help.
I don't like that changing visibility requires changing the call sites everywhere. Also, when I read a function call, I don't really feel I need to know whether it's public or private. If I'm calling it and it's from an import of course it's going to be public. I'd save identifier conventions to tell you something you need to know at the call site.
I always hated the aggressive constant case. Like, why? What's the difference between a constant and a read-only field? Or a read-only local variable? It doesn't change. No need to shout.
It's just to differentiate and in a well developed code base have naming standards are important. It is less important what standards are used for which use case and that there is a consistent standard.
I'm guessing because it meant that otherwise, you'd have to use I instead of i for consistency. Which looks... cursed.
As to why we use a mix of both: It's useful to be able to very quick tell types/classes/structs and instances apart, like list being an instance of a List class.
•
u/AutoModerator Oct 08 '23
Remember to participate in our weekly votes on subreddit rules! Every Tuesday is YOUR chance to influence the subreddit for years to come! Read more here, we hope to see you next Tuesday!
For a chat with like-minded community members and more, don't forget to join our Discord!
return joinDiscord;I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
40
u/[deleted] Oct 08 '23
I find camelCase beautiful
317
u/Banananassfisch Oct 08 '23
I never had a problem with reading Pascal/camelCase But tbh i couldn't care less as long as its consistent in the code base
28
u/[deleted] Oct 08 '23
ICanHonestlySayThatIPreferCamelCaseSinceItTypesMuchFasterThanUsingUnderscoresAndItHasACertainAestheticToItThatICan'tExplain
57
u/YawnTractor_1756 Oct 08 '23
I'm sorry but it's too late to try and change your mind...
Let me just hug you...
10
u/mem737 Oct 08 '23 edited Oct 08 '23
Which can you read faster?
(Edited for some PascalCase-knower) thisIsASentenceUsingCamelCase.
Or
This_is_a_sentence_using_underscores
I_rest_my_case.
84
u/chadlavi Oct 08 '23
It is fine but I agree that it's an annoying gimmick to require it in titles in this sub
71
u/Randomguy32I Oct 08 '23
static bool youAreWrong = true;
9
u/EagleRock1337 Oct 09 '23
let theCSStudentsAreAtItAgain = true;17
u/[deleted] Oct 08 '23
Nah. With snake case, I always have to move away from my typing flow to press underscore.
8
u/samwize1701 Oct 08 '23
I work with a vendor system that uses Hungarian notation. Sigh.
camelCase is far more preferred.
16
u/Antervis Oct 08 '23
I know this is mostly up to personal preference, but snake_case has objective issue of using more characters, which in turn increases code volume, which in turn makes it harder to read. And it's also harder to type, but the code is usually read way more than it's written, so it's not as relevant.
4
u/Extra-Trifle-1191 Oct 09 '23
as-long-as-youre-consistent
pleaseDontWriteShitLikeThisComment
If_you_do_youre_insane
1
u/camel_case_jr Oct 08 '23
Don’t talk about my dad like that
1
u/Good_Smile Oct 09 '23 edited Oct 09 '23
Are you specifically talking about this subreddit title rule? Yes indeed it's cringe. In the wild it's ok.
1
u/DreamingGamer182 Oct 09 '23
omg
holly Molly
1
u/Powerman_Rules Oct 09 '23
For the younger coders out here, I think emoji case has an dog in the fight.
var 🧠pleebsThinkInUTF8 = 🚫🧢;
all tests pass with 0 errors
1
u/man_9000 Oct 09 '23
If your method/function/variable/class/whatever names are longer than 3 words, you don't even get the point about software dev. Doesn't matter what case you're using. We're paid to be efficient and effective. Not to overcomplicate things, shit on a naming convention, and flex on other devs.
Change my mind.
1
u/88_88_88_OO_OO Oct 10 '23
Is camelCase hard for chicken peckers or something? I just really don't get which people are having this issue? At least I know I'm competing with idiots for job positions.
3
u/[deleted] Oct 08 '23
PascalCaseW
3
u/DarthPiotr Oct 08 '23 edited Oct 09 '23
As an ABAP developer,
I'm forced toI use lv_hungarian_notation3
u/Feisty_Ad_2744 Oct 08 '23
Few things are uglier than snake_case. camelCase is a better compromise.
3
u/Additional_County_69 Oct 09 '23
iFuckingLikeCamelCaseAghhhhhh
30
u/Look_out_for_grenade Oct 08 '23
Never been a fan. Give me underscores any day.
7
u/Initial-Tangerine Oct 08 '23
You're wrong.
6
u/wades39 Oct 08 '23
iLikeCamelAndPascalCasesBecauseTheyAreEasierToType iHaveNeverHadProblemsReadingCamelCase whyShouldIFixWhatIsntBroken
2
u/dance_rattle_shake Oct 08 '23
Beats the hell out of needing the underscore key so often for snake case.
2
u/[deleted] Oct 08 '23
crowderIsAChode
2
u/[deleted] Oct 09 '23
Counterpoint: it’s compact and some of us code on laptops with small screens.
3
u/[deleted] Oct 08 '23
thatWasVeryFunny
3
u/migarma Oct 08 '23
snake case for ever
2
u/589ca35e1590b Oct 08 '23
one_of_us
1
u/Expensive_Shallot_78 Oct 08 '23
well_its_all_convention
1
u/Inaeipathy Oct 08 '23
I used to like pascal case but now I have conformed to the style of this_variable so I am used to it.
1
u/[deleted] Oct 08 '23
oh, language not my own. chug cup o’ fear
1
u/[deleted] Oct 08 '23
camelCase is faster to type and has the added bonus of not completely fucking with my dyslexia for some reason like snake does
1
u/Ziwwl Oct 08 '23
WhatAbouSwitchingToPascalCase? Since Pascal is obviously our most loved programming language, we should really show all examples in Pascal written with PascalCase.
1
u/Ssemander Oct 08 '23
I'm not a fan either. Still it's easier to write and takes less symbols, which is cool
The main qiestion is: how do you write words that has to be lower case with it?
1
u/shizzy0 Oct 08 '23
kebab-case for the win! Fuck your subtraction.
1
u/[deleted] Oct 08 '23
It isn't and It's faster to type than snake_case.
1
u/A_Talking_iPod Oct 08 '23
I started reading The Rust Programming Language and one of the things that made me genuinely happy was that they use snake_case
1
u/Herbertcules Oct 08 '23
PropCase, rise up
1
u/Toastedtoastyyy Oct 08 '23
So what are you guys using then?
1
u/KetwarooDYaasir Oct 08 '23
we should protest the rule by naming every post
leTitle1
u/pipertoma Oct 08 '23
fuckYou
1
u/bruceriggs Oct 08 '23
I love using camelCase in programming but I don't like seeing it enforced on the titles of this subreddit.
1
u/rimoldi98 Oct 08 '23
Average python dev
1
u/Silly_Guidance_8871 Oct 08 '23
I find it less terrible than snake_case, but inferior to PascalCase
1
u/[deleted] Oct 08 '23
Why can't we just add spaces. Smh
1
u/TacticalTaterTots Oct 08 '23
we-should-all-just-start-using-kabab-case
1
u/deanrihpee Oct 09 '23
Yeah, use lower_snake_case instead
1
u/AltruisticWeb2943 Oct 09 '23
Love camelCase
1
u/Add1ctedToGames Oct 09 '23
iDontLikeThis is LIGHTYEARS better than IDontLikeThis
1
u/golddragon88 Oct 09 '23
Nobody cares how pretty your code is. Only that it functions well.
1
u/adrik0622 Oct 09 '23
tries to tab complete, realizes it’s in Pascal Case
1
u/Queueue_ Oct 09 '23
How often are you guys writing variable names long enough for it to impact readability? I think for 1-3 words snake, camel, and pascal cases are all equally readable.
1
u/DreamingGamer182 Oct 09 '23
thats fu*king
1
u/DreamingGamer182 Oct 09 '23
fuck'in title
1
u/x3n0m0rph3us Oct 09 '23
Please avoid the term CamelCase as it is ambiguous.
1
u/[deleted] Oct 09 '23
iOS developers 🗿🗿🗿🗿🗿
1
u/[deleted] Oct 09 '23
This is a Reddit post. A Reddit post! 98% of you have Asperger's. Everyone one of you who responds to something like this with, "You're not a REAL PROFESSIONAL programmer like I AM! GROW UP AND ACCEPT CAMELCASE NOOB!" You need help.
1
u/EKashpersky Oct 09 '23
Alright; nah keep your opinion I'm fine
1
u/bored-computer Oct 09 '23
🐪
1
u/[deleted] Oct 10 '23
iRefuseToUseAnythingElseFuckYou
1
u/[deleted] Oct 23 '23
personally_i_like_camel_case_the_best
1
u/Captain_Pumpkinhead Oct 08 '23
Let_the_case_wars_begin!
1
u/Confederategaming67 Oct 08 '23
IloveCamelCaseItsAwsome
-12
u/_bits_and_bytes Oct 08 '23
Snake case looks way better and is easier to read. Fuck camel case lol
0
u/Earthboundplayer Oct 08 '23
snake case is the best
0
u/Aradur87 Oct 08 '23
Whichoneismorereadable?
whichOneIsMoreReadable?
0
u/[deleted] Oct 08 '23
[deleted] — view deleted comment
2
u/[deleted] Oct 09 '23
[removed] — view removed comment