[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 6541.png (62 KB, 1200x600)
62 KB
62 KB PNG
You dare to not use the LGBTQIAHAH+-friendly snake case? Then you must write a flag that itself is snake case, and maybe the compiler will grant you permission.

You VILL write the cumbersome and angering snake case.

Total shit, all because commie tranny autists can't handle some characters being bigger and thus more dominant than others. Look at evil camelCase, what gives the C the right to be bigger than everyone else?!?! This is white privilege and equal to genocide!!!!
>>
>>102474238
i recognize that you are using english but man, i got nothing here. did your mother drink a lot when she was pregnant with you?
>>
>>102474238
Your brain on /pol/
>>
>>102474266
>I'M A REAL WOMAN!!!
>>
>>102474238
Unironically based. If you do not adhere to the coding style the programming language uses, you should kill yourself. People who use niggerCase in C/C++ are the worst. The standard library uses snake_case. You should too.
>>
>>102474238
a seething nocoding incel wrote this
>>
>>102474308
Imagine sitting down and writing snake case and feeling good about it lol. Anyone who actually CHOOSES to use snake case is mentally ill. It's like just making up "backtick case" and every variable is written like my`variable. You want to use that language? This is moronic.

_ is literally an extra character you have to type in absolutely every variable, forever. Maybe within a few years you will have written around 100,000 lines of code made solely of underscores.
>>
>>102474302
Anon, that's a lesbian asexual, not a tranny
>>
>>102474334
That is literally anyone who uses snake case. It's idiotic. Like most Rust decisions it's from the HR department/business-end CEO because he has no context to know what things mean beyond "this looks clearer" or "this performs better". It's like the type of people who would tell you that you should write fully fledged modern enterprise software or video games in assembly.
>>
>>102474368
>>102474425
>Imagine sitting down and writing camel case and feeling good about it lol.
>Anyone who actually CHOOSES to use camel case is mentally ill. It's like just making up "backtick case" and every variable is written like my`variable. You want to use that language? This is moronic.

>shift is literally an extra key you have to press in absolutely every variable, forever.
>Maybe within a few years you will have pressed shift around 100,000 while writing code.

See how this makes no fucking sense? Might as well make it readable by putting and actual delimiter between the words you're trying to connect. Also, I do not care about snake case. But you can't read. I care about following the style of the programming language. I'll happily use camel case in languages like JavaScript. But in Python, C or Rust, I'll use snake case because that's what the developers of the language decided to use.
>>
>>102474555
what an idiot lmao
>>
>>102474589
I accept your concession
>>
>>102474308
>niggerCase
kek based
>>
>>102474555
backtick case? isnt that perl or awk or some other retarded shit leftover from the 70s?
>>
I don't see what wrong with having a containment language for the mentally ill.
>>
>>102474555
camel case for class names.
snake case for everything else.
those who disagree suck cock by choice
>>
snake_case_is_a_good_thing
camelCaseIsABadThing


the right answer is ofc to adhere to the style guide of the language, but everyone who prefers camelCase over snake_case should just kill themselves
>>
>>102474238
camel case
more like
cringe case
>>
File: leftist lip plate moron.jpg (299 KB, 818x1226)
299 KB
299 KB JPG
>>102474238
wouldn't be an issue if it were lisp-case, but underscores are cumbersome to type
>>
>>102474688
It's a character you can use in variables in BASIC. But nobody ever did that.
>>
>>102474238
I checked that guys social media, he's together with someone who says they're non binary but on hormones. Or in other words just two dudes fucking.
>>
File: spongebob-meme.jpg (53 KB, 547x548)
53 KB
53 KB JPG
>>102474238
>WhY aM I fOrCeD tO wRiTe My FuNcTiOnS iN sNaKe CaSe
>>
>>102474555
Underscore is shift AND a button, and then the next letter. So variable_name is shift + hyphen -> n to start the second part of the name. variableName is shift + n, so yeah it's an extra key.
>>
>>102474960
A negligible amount of time really.
>>
>>102474955
Functions should be Pascal Case. This is a solved issue. camelCase for variables, PascalCase for functions or classes, SCREAMING_SNAKE for constants and enums.
>>102474555
I happily follow language style guides, and won't use snake case languages. It sucks major cock. I honestly think _ might be the most unnatural character to hit out of every single character on the keyboard.
>>
File: 1726843035337405m.jpg (156 KB, 769x1024)
156 KB
156 KB JPG
>>102475014
you are wrong though.
>>
File: 1535187676101.jpg (92 KB, 575x428)
92 KB
92 KB JPG
>>102475014
>This is a solved issue. camelCase for variables, PascalCase for functions or classes, SCREAMING_SNAKE for constants and enums.
Based thinking man of great intellect.
>>
>>102475014
>I happily follow language style guides, and won't follow language style guides
Huh???
>>
>>102475121
I won't use the language at all if it's snake case. I won't write ANYTHING in it. I find typing _ to be a very slight disconnect from the flow of typing... My autism is particularly sensitive to these things and over time the very mild annoyance builds into palpable discontent.

Every_time_i_write_an_underscore my typing flow is interrupted for a split second. But I canWriteInCamelCaseLikeThisEasilyWithoutEverInterruptingMyFlowOfTypingBecauseMyHandNeverHasToReachUpFromTheMainKeybed
>>
>>102475165
If you have such severe autism that lifting your pinky one centimeter causes a meltdown you should probably be using an alternative keyboard layout
>>
>>102475165
Just remap the key you sperg
>>
>>102475165
I see. What languages do you use if I may ask? C#?
>>
>>102474992
right, but to nocoding NEET trannies, this is like the battle of the bulge. they will stake their entire personalities and well-beings on "winning" the debate over this
>>
>>102474369
rainbow flag means lgbtq, what does that have to do with lesbians
>>
>>102475165
You're not missing out on p*thon or meme langs with that. But conventions are just that, one is more than free to ignore them. Code reviewers get the rope.
>>
>>102475235
What it is, is that it's a break in flow. This will explain it precisely: imagine listening to a song on the stereo, but after each lyric the sound cuts out for a split second. That's exactly what writing snake_case feels like to me, srs. It drives me nuts.
>>
>>102475332
Are you not using completion?
>>
>>102475332
itsenglishyouretard. inenglishwordsareseparatedbyspaces.
>>
>Project sticks to one naming convention preventing a clusterfuck
>Poltard immediately blames the boogeyman in his head
Horseshoe theory.
>>
>>102475344
Ofc, it doesn't fix it though, not entirely. In a sizable codebase, generally speaking you will have many variables that at least start with the same thing, so to get to the correct autocomplete you still probably have to type the_first_ part of the variable.

It's only a minor annoyance, but the thing with code is that it's repetitive. If a language uses underscore, you will be hitting at least one underscore almost every time you need to use a variable. Initially this is fine, but over time it's not.

Interestingly, underscore doesn't break flow in SCREAMING_SNAKE_CASE because the shift is held throughout, so experientially it feels like kebab-case. I get why hyphen isn't a shift key, but for programmers I know you all wish the hyphen and underscore were swapped.
>>
For me, it's Shish-Kebab-Case
>>
>>102474369
pansexual non binary actually
t. knower
>>
>>102474238
have you tried using mixed_Case? it's the new hotness!
>>
>>102475456
Why do you know?
>>
>>102475494
I'm pan and poly transfem
>>
>>102474555
>I can't do anything in any way different than language uses in own API
Yes you can, cuck
>>
>>102475412
>but for programmers I know you all wish the hyphen and underscore were swapped.
what part of just rebind the key instead of writing whiny essayposts is flying over your head?
I literally do this, my '/" key is _/-. I could write paragraphs of pure snake text at >90wpm if I needed to for some reason
>>
>>102475638
Everyone loves whining, that's why rant videos get 10000000 views on the Tubes. I'm never rebinding my keys lol, builds bizarre habits that won't transfer universally. Eventually I will reach for a ' and it inputs a _ or something. This is partly why Macs anger people so much.
>>
>>102475553
>heh look at those sheep doing what they're told. i, however, am different, i will do my own thing
Tell me you have never worked on a large codebase without telling me you have never worked on a large codebase. Consistency is key in everything more than "Hello world!". Deviating from coding style guidelines does in fact not make you an independent thinker like you think it does.
>>
File: 1136892682962.jpg (25 KB, 525x384)
25 KB
25 KB JPG
>>102475680
>this character being shifted is causing me such severe mental distress that I literally cannot handle pressing it
>then take it off shift
>NOOOOOOOOOOOOO I'LL NEVER FIX MY PROBLEMS
>>
>>102475494
iwnbaw
>>
>>102474238
>toy language has meme rules
yawn
>>
>>102474238
Just_map_your_spacebar_key_to_"_".
>>
File: GXzJl7cX0AAeo0a.jpg (219 KB, 1170x1266)
219 KB
219 KB JPG
>>102474238
What does lgbt have to do with snake case?
>>
>>102475792
It's not a fix, it's idiotic. It's like buying one of those split headphone jack and charging ports for modern scam-mobiles that have no jack (they break instantly, are all Chinese junk, and barely function properly).

It's like a hacky workaround that will cause breakage in other areas. I bind / to _, get used to hitting / whenever I want an underscore, and now when I leave the IDE and do something else, I try to hit / and accidentally underscore. It's not a fix.
>>
>>102475809
you can be my woman
>>
>>102474238
I hope you kill yourself, worthless /pol/ subhuman.
You don't even program anyway so it's not like this affects you.
>>
>>102474238
you got filtered. good, because you are a moron. either use the language's conventions or get fucked
>>
>>102475931
>use the language's conventions or get fucked
Faggot
>>
>>102475931
abnormal amounts of copium ITT
not sure if troll
>>
>>102475883
>and now when I leave the IDE and do something else, I try to hit / and accidentally underscore
change it in the global layout then you mong
>>
>>102475919
You aren't a woman. You were never a woman. You will never BE a woman. How compromised is your mind exactly that you can't live with your biological sex? It's probably the easiest thing in the world to live with, even if you're right that you're actually a woman trapped in a man's body. Just live with it like wtf?
>>
>>102474266
You're retarded, stop posting and lurk moar.
>>
>>102476065
And you will never have a woman as company.
Now go back >>>/pol/
>>
>>102476111
nta but nor will you lmao
>>
>>102474290
>>102475919
This. poltards btfo.
>>
File: 1726441152163873.jpg (544 KB, 940x882)
544 KB
544 KB JPG
>>102475885
uwu
>>
File: 1724456270571119.jpg (82 KB, 1024x573)
82 KB
82 KB JPG
>>102475855
They were slaves and forced to work, e.g. bake bricks. Why don't you get another hobby other than history?
>>
>>102476111
I've had the "company" of literally over 100 ugly/chubby women in my life. And a few non-uggos who don't count because they were German or 30 or Greek or some shit.

>>102476130
Trannies literally think their tranny boyfriend is a woman and thus it's "hetero". Tranny is like 99% just a cope to avoid admitting to yourself you are gay. Literally like "uh okay so look, I took a dick up the ass, but the thing is I'm actually a woman so it's not gay".
>>
snake_case_is_fascist
camelCaseIsHomoSexual
>>
File: 1699934673415927.png (22 KB, 585x203)
22 KB
22 KB PNG
>>102474302
>even the drawing is ugly
>>
>>102476201
>femboy
How fucking crazy is it that Rustaceans earlier tried to claim this was a woman lesbian? They want to obfuscate the fact their language only exists because the clever devs went full all in on trannies and manipulated them into using Rust.
>>
File: 1721281135798779.jpg (33 KB, 400x400)
33 KB
33 KB JPG
>>102476272
heres another one from that site:
https://blahaj.social/@leah
https://leahneukirchen.org/faq.html

what percentage of rust users are trans?
>>
>>102476065
can you empathize with how incels feel
just complete fucking hopelessness that they won't ever live up to their own ideal form of masculinity?
trooning is like that x100, you can't do anything about the fact that ywnbaw and that your life is basically over because of a bad dice roll
trooning out is like gymcelling, it might not improve your situation but it's the only thing you can do because the alternative is being passively / actively suicidal for life like "blackpilled" dudes
>>
File: which-marginalized-group.png (46 KB, 1400x1200)
46 KB
46 KB PNG
>>102476299
>what percentage of rust users are trans?
>>
>>102474238
The trannoid creature is filing a bug report saying that allow(non_snake_case) is ignored. This means that xhey/xhem are trying to use the attribute, which in turn means that they're trying to NOT use snake case for xheir variables.
Also, this is a bug report for rust-analyzer, not for the compiler. rust-analyzer is optional, and even if you choose to use it, it just shows some squiggly lines in your IDE. It doesn't stop you from compiling the code.
You seem a bit confused here.
>>
>>102476376
>50% sexually deprived spergs with no contingency
imagine the smell
>>
>>102474238
So many buzzwords
>>
File: Untitled.png (262 KB, 1024x1024)
262 KB
262 KB PNG
Why not kebab-case? Szalatt? Szwiewelja?
>>
>>102474238
>getting offended over lower & upper case letter
This just proves they are inferior. These mentally ill freaks need to be removed from tech. Reopen the insane asylums.
>>
>>102474302
>rust tranny
Many such cases
>>
>>102476446
>give them a home for free and feed them for life
nope not this time
>>
>>102474369
Part of the spectrum, all the same.
All trannies with extra steps.
>>
>>102474238
a case insensitive basic was created 60 years ago.

imagine arguing about meaningless bullshit instead of designing languages for humans. just make case insensitive language with automatic removal of _ character and let people format code whatever they want.
>>
>>102474238
The bigger issue with rust-analyzer is how you have to jump through hoops to even get a smidgen of editor-independent configuration. It is absolutely baffling how the analyzer relies solely on file-level annotations for any kind of independent configuration rather than project-level configuration like literally every other analyzer/linter out there.
>>
>>102474238
>>102474868
>>102475165
>snake case
>one extra character to separate every word
>one extra byte to separate every word
>HYPOTHETICAL TIME
>some embedded library exports 256 functions with two words each
>one extra underscore for every single function
>one extra byte for every single function
>that's 256 bytes of extra wasted space just on exported names
>could have used the extra 256 bytes to fit 2 or 3 extra functions
>my shit is filled with useless underscore bytes
It's a waste of space and it's harder to type. Fuck whoever came up with this stupid naming convention.
>>
>>102476457
Not really; just CamelCase for types, LOUD_SNAKE_CASE for constants, and snake_case for everything else.
>>
>>102480179
PascalCase is not camelCase.
>>
>snake case
Python devs hate staircase:
V
A
R
I
A
B
L
E
>>
>>102481306
i laughed
thanks anon
>>
>>102474836
the only non retarded anon
>>
>>102476438
I●WANT●ROMAN●CASE●NAMES
>>
>>102482059
ANIMVS
>>
File: vaporwave-7-206629983.jpg (220 KB, 1650x825)
220 KB
220 KB JPG
>>102482295
FN DOVVNLOAD ● ANIMVS ● IAPANVS
(
ID: My ● Anime ● List ● Series ● ID
)
=> ASINCHRONVS FILE ● IEELDER 《 ANIMVS ● IAPANVS 》
{
/* ANIMVS UvvU */
SIS EXECVTVS ! ( "yt-dlp" , "{}" , ID , ... )
}
>>
File: file.png (87 KB, 500x270)
87 KB
87 KB PNG
>>102474238
is php a tranny free programming language?
>>
>>102482453
Why do you care if a programming language is tranny free? It's not like you'll ever be programming in one, /pol/tard scum.
Go back. >>>/pol/
>>
snake_case is for python only. troons/alphabet idiots are literally degenerate retards. gross. zig is chad, rust is fag
>>
File: FAPQ6acXMAYz7i-.jpg (79 KB, 1200x847)
79 KB
79 KB JPG
some_variable
SOME_CONSTANT
someFunction
SomeType

Any other naming convention is objectively inferior for ALGOL/C/Java-likes.
>>
>>102474836
missing UPPER_CASE for enum values and macros
>>
File: 1706463403951929.jpg (14 KB, 226x218)
14 KB
14 KB JPG
>>102476299
lmao
>>
>>102474238
They fear the masterCase
>>
>>102474238
>tcp_socket
>TcpSocket
>tcpSocket
Which way white man?
snake case is easier to type if you bind the underscore.
>>
>>102474868
holy shit, snake_case was easier to read. I have now been pilled.
>>
>>102483777
>snake case is easier to type if you just remove your penis
And yet not removing my penis is easier all the time instead of a single instance.
>>
>>102483777
TCPsocket
This is my naming convention, i just invented it. You can't use it without express permission.
>>
>>102483777
Usually I follow the TcpSocket convention.
>>102483840
But I dev a lot of crypto shit and when it comes to shit that was stupidly named with numbers, I use all caps for the acronym.
>WalletP2pkh looks gay
>WalletP2PKH looks better
>>
>>102483777
TcpSocket. It gets PascalCase since it is a type. PascalCase rules state that for acronyms longer than two characters only the first character is capitalized. So you could do TcpSocket or TransmissionControlProtocolSocket. Obviously one of those is preferable to the other.
>>
>>102483777
>>102483840
Case sensitive search on github:
>193k TCPSocket
>163k TcpSocket
>113k tcp_socket
>109k tcpSocket
>36k tcp-socket
>616 tcp_Socket
>84 Tcp_Socket
>77 Tcpsocket
>21 Tcp-Socket
snake_case fags get the rope.
>>
>>102483959
Ah, I forgot
>3.6k TCPsocket
>>
>>102483959
>193k TCPSocket
Those are all mine.
>>
>>102483882
ffs can someone validate that im correct in this convention or not ffs
>>
>>102474302
>A troon profile
>Using snake case
They really are a brood of serpents aren't they?
>>
>>102476272
femboys aren't trans
>>
>>102474302
lesbians don't use those retarded flags everywhere
>>
>>102475280
>rainbow flag means lgbtq, what does that have to do with lesbians
LGBTQ = Lesbian Gay Bisexual Trans Queer
you cant be for real
>>
>>102474238
EITHERLIKETHIS
orlikethis
Everthing else is a mental illness.
>>
>>102474308
>if you dont adhere
stopped reading right there, you are a true cuck corpo ass licker
and a big time faggot
>>
>>102480136
>waste of space
doesn't matter, moore's law
>harder to type
doesn't matter, auto-complete, and easier to read is more important than easier to write
camelCaseLost

snake_case_won
>>
>>102474238
snake case is objectively more readable
also, OBSESSED
you should kill yourself retard
>>
>>102482934
>
someFunction

You misspelled some_function.
>>
>>102474238
>cumbersome and angering snake case
Skill issue. Maybe you are simply too dumb for programming.
Also, camelCase sucks lmao. I would reject your pull request too if you didn't follow my project conventions because you want to be a special snowflake.
>>
>>102483959
>TCPSocket
pure retardation
>TcpSocket
actual programmers
>>
>>102475456
>>102474369
In other words, an ugly woman who hasn't gotten enough dick?
>>
>>102474425
um sweaty, using capital letters ruins my casual aloof vibe and aesthetic
>>
>>102475014
>>102474960
>>102474425
>he doesn't have underscore bound to shift+space
>>
>>102485105
See >>102475766
>>
Nocoder thread...
>>
>>102474368
snake case is objectively superior
>>
>>102486840
To be perfectly honest I find it less legible unless it's really_long_names_which_are_dumb_anyway. newRepo vs new_repo, underscores LENGTHEN the variable names unnecessarily. I like the convention where snake declares some sort of domain... Like sql_getTable where all SQL stuff is prefixed like that. Sadly literally zero people use it.
>>
>>102486840
Ok pytard
>>
>>102486905
And to be clear, I mention lengthen because of the fact that the more things are dragged out into verbosity, the more and more something starts to resemble Rust, and loses maintainability and scalability.

Five extra underscores in your function name means five characters less unencumbered space the code below it has. Now you get it?

fn code_goes_here(var_1 *int, var_2 *int) {
var_1 += (var_2 * var_1) / 100
}

V.S.

fn codeGoesHere(var1 *int, var2 *int) {
var1 += (var2 * var1) / 100
}


See with your own eyes, legible maintainable code vs something approaching Rust legibility, all due to snake case alone.
>>
>>102486905
i want you to reflect on why that is then kill yourself whether you realize why or not
>>
>>102486977
Btw I forgot to dereference and the actual posted content's function body in this case didn't go past the function declaration, but who gives a shit. Even there, camel looks cleaner. Rust looks like a messy teenage autists bedroom.
>>
>>102482295
underrated
>>
>>102482470
not like you'll live long enough for him to prove you wrong
>>
>>102486995
I made many things in SourceSDK with that convention, and faced zero issues. Great convention, keeps redundant name lengths clearer. domainThisFunctionRocks vs domain_thisFunctionRocks. Your eye can very easily dismiss the domain_ portion entirely in a nanosecond, and it essentially looks like "thisFunctionRocks".
>>
>>102487063
Anon, xe killed xerself last night after being misgendered. This isn't the time to be taking potshots at xer.
>>
>>102486840
Dilate.
>>
>>102475257
Only emacs trooners can suffer pressing _ all the time because their already on painkillers because of emacs induced carpal tunnel syndrome
Kill all emacs niggers and snake case dies with them
>>
>>102485966
TCPSocket is microsoft troons
TcpSocket is google chads
>>
>>102487063
>>102487115
Faggots. You do not belong on here. Kill yourself already. Nobody will miss you.
>>>/pol/
>>
>>102474238
oh nooo, the aryan race is under attack by the big gae
>>
>>102474238
Good. Stay filtered. Nobody wants wastes of oxygen like you in their project anyway.
>>
>>102487247
>>102487741
They will misgender and deadname you on your tombstone bro lol... I OWN the "projects"... Now I'm retired and have infinite time every day to harass transexuals.
>>
>>102476376
>woman or percieved as a woman lower than trans
kek
>>
>>102480136
doesn’t matter once compiled, retard
>>
>>102488484
stay away from computers you fucking jeet
>>
Let's see it in action again:

fn code_goes_here(var_1 int, var_2 int) {
var_1 += (var_2 * var_1) / 100 * (var_1 / var_2) * var_2 / var_1
}

V.S.

fn code_goes_here(var1 int, var2 int) {
var1 += (var2 * var1) / 100 * (var1 / var2) * var2 / var1
}


Snake case is untidy, snake creates dirty autist code. Camel case creates maintainable tidy code.
>>
>>102474238
I just use a variant of the dewey decimal system but start all variables with 132
>>
>>102475014
based C# chad.
>>
>>102474238
>LGBTQIAHAH+-friendly snake case
snake case is trad. go back to writing javascript, or whatever other shit language that normalized this camel case retardation.
>>
>>102489426
snake case doesn't mandate an underscore before the numbers, you retarded fucking nigger.
>>
>>102485237
>doesn't matter, moore's law
>doesn't matter, auto-complete
This right here is why developers aren't as productive and efficient today compared to back in the 70s and 80s.
The original Unix was written in under a month back then.
>It just doesn't matter, because muh fast hardware will save me.
This is what retards believe when they choose to build their application with Electron. CPU cycles? Memory consumption? None of that matters because muh Moore's law.
Fuck that, stop using Moore's law as a way to justify inefficient standards and conventions.
>>
>>102474238
LOL, wait, does the Rust compiler refuse to compile if I don't use snake_case?
>>
>>102484013
Mind if I borrow some? I really like that naming scheme.
>>
>>102475014
cringe csharpie
>>
>>102475014
This. I write C and C# that way. I don't like using _ because it's not in a comfy position.
>>
>>102491653
you're an idiot. auto-complete makes developers more productive, and means that the extra characters don't matter, in terms of typing, so you should use the more readable style, which is clearly snake case.

>b-but much extra bytes in the source code!
lmao, what decade is this?
>>
If you submit to the whims of language "designers" you're a beta cuck. I will write my variables in whatever damn casing I please. Fuck yourselves if you have a problem with it.
I also refuse to put braces on a new line in C#. Get over it ladies. It's my code and I do what I want.
>>
>>102491817
By default it prints a warning.
#![allow(nonstandard_style)] at the top of your crate disables all warnings about identifier casing.
>>
>>102492075
This is pretty cucked. Why would I want to compiler to micromanage how I name my variables? Everybody uses snake case in Python, but nobody actually forces you to do it.
>>
>>102492119
Usually when I write Python I use flake8 or pylint or some other tool that actually does yell at me to use snake case. Unless I turn that lint off. Which you can also do in Rust. You're not really forced into it.
I read a lot of other people's code and I'm grateful that most of it sticks to the same conventions. One less distraction from the stuff that matters. I've found this more consistent in Rust than in Python, not even 100% of Python's stdlib is snake case.
Maybe the biggest reason not to build the check into Python itself is that Python doesn't have a separate compilation step. They did think it was important enough for a PEP.
>>
File: ITSMAAM.jpg (110 KB, 1080x1080)
110 KB
110 KB JPG
>>102474302
>IT'S MA'AM
>>
>>102492267
>I've found this more consistent in Rust than in Python, not even 100% of Python's stdlib is snake case.
Yeah, it's not 100%, but it's pretty universal in the Python world.
Now PHP is more of a mess, most of it is snake case but there are some libraries which do pascal case and some of them do camel case. The situation feels similar to C with even less standardization.
>>
>>102474868
>style guide of the language
Lololol kill yourself
>>
>>102491522
fn filthy_untidy_underscores(num_of_genders int, lack_of_cock bool) {

num_of_genders = lack_of_cock * penis_inversion

}

fn filthyUntidyUnderscores(numOfGenders int, lackOfCock bool) {

numOfGenders = lackOfCock * penisInversion

}
>>
>>102492568
thankYouForClearlyIllustratingWhySnakeCaseIsSuperiorToShisKindOfUnreadableGarbage
>>
>>102492929
I'm ANGERED that you find camel less tidy, desu. Snake case is CLEARLY untidy, it blatantly looks messy as fuck.
>>
>>102492929
Yeah, snake_case is the best for ESLs.
>>
>>102474868
I use both to denote different things.
Different things each time as well.
>>
>>102492947
yesOfCourseBecuaseSeparatingWordsIsSoMessyAndItReallyHurtsReadability
>>
>>102493036
It does, it's been demonstrated several times now. Variables don't have that many words, this is strawman. Variables and code is more quantity over length. So you're more likely to see thisVar thatVar myVar yourVar thisIsGreat.

Snake case creates tonnes of _s all over the code. As demonstrated. It lengthens variables and function names, it literally looks like a kid just got their box of legos and dumped them over the floor.

my_var your_var this_var this_is_aids.

Especially with multiple lines, it starts looking like Rust.
>>
>>102493091
it_literally_looks_like_normal_writing_except_that_instead_of_a_blank_space_there_is_line_between_the_words
claimingThatItIsMoreMessyThanJammingAllTheWordsTogetherIsJustRidiculous

doesn't matter if variable names aren't normally that long, camel case is still a messier style. i don't know where it has supposedly been demonstrated that snake case hurts readability, because the only study i found said that non-programmers found it more readable.
>>
>>102474368
>_ is literally an extra character you have to type in absolutely every variable
shift - is the same amount of fucking keystrokes as using a capital letter like a dumbRetardAfterEveryWord and the latter looks fucking awful
shut the fuck up
>>
>>102492568
The one at the bottom looks like utter garbage
>>
>>102486026
what about the fag allegations?
>>
>>102493426
Average snake case user (AKA a total beginner).

varA

4 characters. Capital A is shift + a.

var_a

5 characters. Underscore is shift + - PLUS then "a"

>>102493310
Yes it does matter a LOT what the average length of variables is.

ifYour variablesAre
generallyOnly twoWords
thisProduces
tidyCode.

Compared to
if_your variables_are
generally_only two_words this_produces
dirty_code
>>
>>102493447
I just don't like it. In real codebases, camel is tidier to me and snake looks like Rust (which is famous for looking like a mess and never being maintained as a result). It is angering that the examples keep looking like >>102493502 because it doesn't represent real codebases well.

I hate underscores, I hate how they look, I hate typing them, let's just be real that's all there is to it. I just don't like them and that's that...
>>
>>102493502
again you're just demonstrating why snake case is better. i don't know what's wrong with you that makes you not see this, but your first example is the messy one.
>>
>>102493562
Probably... The real fact is I just don't like or feel comfortable writing snake case. I only wrote snake case as a noob. The idea of sitting down writing snake every other term gives me a sinking feeling. I hate typing underscores.

Are they positioned differently on an American keyboard? On British keyboards they're located as inconveniently as backtick.
>>
>>102474868
I just use trannycase because it doesn't require any additional finger gymnastics or cognitive overhead. camelCase and PascalCase are annoying but usable because you just have to hit Shift. snake_case is godawful because now I have to stretch to hit the _ key.
Anyways, another reason not to use rust.
>>
>>102493836
No, _ is Shift + minus on the Amerishart keyboard too. It is not a comfortable location. I also have typing underscores.
>as inconveniently as backtick
The backtick is literally to the left of the 1 key, without any modifiers. I think it's a pretty decent position.
>>
File: 121857244_p0_master1200.jpg (971 KB, 800x1200)
971 KB
971 KB JPG
While I do prefer snake_case, the compiler should compile whatever I tell it to compile, even if it's ALL_CAPS or ReTaRd

Min-maxing non-issues with rules is such a dumb thing to do
>>
>>102475766
>you don't understand, I have been a cog in a machine that turns shit into turds, this is real life!
>>
the default case for cpp is snake case
https://en.cppreference.com/w/cpp/language/constraints
>>
C is the grand white wizard of computer programming and what ever it's creators say goes.
>>
snake_case is used in the C++ standard library. Most Rust programmers are former C++ programmers, so we want to maintain similar language conventions. What we'd really like to avoid is mixing conventions like PHP does. If the standard library uses a particular naming convention, it should be used consistently. It should also be adopted by all 3rd party libraries. Everyone writes the same style, and no one gets any surprises.

This isn't a piece of art. You aren't entitled to your own means of artistic expression. Your codebase will be read by others and edited by others, and for the sake of cohesion, we want everyone on the same page.
>>
>>102494212
The compiler *will* compile your program even if you don't add #[allow(non_snake_case)]. It doesn't give you an error, but a warning.
>>
>>102495025
>You aren't entitled to your own means of artistic expression
Oh I'm, because I don't use languages that dictate what I should do
Good luck on your 1000th rewrite of a unix tool, certainly the strict rules and bureaucracy aren't a larp and will change everything
>>
File: img-2024-09-22-00-06-13.png (232 KB, 1798x1618)
232 KB
232 KB PNG
>>102495025
Let's be on the camel page? It looks different in a code editor/IDE than plain text. Plain text doesn't do camel justice.
>>
>>102474238
Troon language
>>
I will not be tread upon.
>>
>>102475014
PascalCase for functions, snake_case for variables and structs
>>
I use the SuperiorCaseForChads. I don't know the name, I just capitalise every word, including the first.
>>
>>102495804
The name is literally right above your post >102495553
>>
>>102495804
That's called PascalCase. Rust uses it for types, traits, and enum variants.
>>
>>102474266
fpbp
OP utterly buck broken.
Also why is this shit thread still up?
>>
>>102476299
all of them
>>
>>102495804
You shouldn't, you will encounter problems. First letter capitalization is a pretty important thing that is used to signify something being a class or w.e. in Go it makes the thing accessible from the other includes ("packages") whereas lowercase first letter keeps it private.
>>
>>102474238
>because you write only variable names your whole life. your experience being alive revolves around variable naming conventions

>this is extremely important and the thread will have 10000 replies at least
>>
>>102496268
thats retarded, ngl
>>
This is how I write my functions.

killyourself()

Cope
>>
File: 170395281.jpg (19 KB, 338x294)
19 KB
19 KB JPG
>tfw you type everything in lowercase without underscores
>>
nocapsnospacesalphanumericonlyfinaldestination
>>
For me it's PascalCase functions and snake_case variables.
static char *LookupIconIndexed(IconTheme *theme, const char *icon_name, int size, int scale)
{
if (access(icon_name, F_OK) == 0)
return strdup(icon_name);

char closest_icon_path[512];
int min_size = INT_MAX;

for (size_t i = 0; i < theme->icon_dirs->size; i++)
{
XDGIconDir *curr_icon_dir = theme->icon_dirs->data[i];

// First check the hash map for the icon
const char *icon_path = HashMapGet(curr_icon_dir->icons, icon_name);
if (icon_path == NULL)
continue;

if (DirectoryMatchesSize(curr_icon_dir, size, scale))
{
return strdup(icon_path); // Exact match
}

// Calculate the size difference to find the closest match
int size_delta = DirectorySizeDistance(curr_icon_dir, size, scale);
if (size_delta < min_size)
{
min_size = size_delta;
strlcpy(closest_icon_path, icon_path, sizeof(closest_icon_path));
}
}

// Return the closest icon path found
if (min_size != INT_MAX)
return strdup(closest_icon_path);
return NULL;
}
>>
File: 1726980578146539.jpg (19 KB, 338x294)
19 KB
19 KB JPG
>>102499301
>using more than 3 characters for variables
>using more than 8 characters for functions
>>
>>102474555
Based
Convention > Preference

>>102474368
>>102474960
>>102475165
If syntax or style is saving you time, then what you are doing can and should be automated away.
>>
i find reversEcameLcasE easiest to read
i also find BookendeD_SnakE_CasE pretty cozy
SCREAMINg_POOp_SNAKe is nice too
>>
>>102499425
You know what? I like those the best, thanks for teaching me your ways.
>>
>>102483777
Checked and proyjgkagrammer Dvorak pilled
>>
For me, it's turning everything into an acronym and spending 45 minutes trying to remember why I have dozen variables named fag
>>
>>102493543
>I don't like it
>I hate underscore
who ask?
>>
>>102474238
RETVRNTOTHEOLDWAYS
>>
>>102495509
>char * name



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.