[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
PascalCase, camelCase, or underscore_case?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 15
Thread images: 1
File: d.jpg (241 KB, 1600x1063) Image search: [Google]
d.jpg
241 KB, 1600x1063
PascalCase, camelCase, or underscore_case?
>>
depends on the language and usage.
>>
>>54542213
depends on the use case
>>
Depends on each case
>>
classes, functions, variables

or similar
>>
Functions: SNAKE_CASE
Variables: SNAKE_CASE
Classes: SNAKE_CASE
>>
bike_shedding
>>
public static final int CONSTANT = 69;
public void calculateMass(yourMom mom) {}
long momMass = Long.MAX_VALUE;
>>
Global functions underscore_case.
Classes PascalCase.
Variables camelCase.
Methods camelCase.
>>
people using camelCase should just kill themselves.
>>
>>54542213
That picture makes me extremely uncomfortable
>>
>>54543234
You're welcome.
>>
>>54542213
depends on the style of the environment you're working with. consistency over preference.

i personally like underscore case best, but a lot of python libs out there use camel, so i wrote a lot of code with camel. it is always a delight to go back to writing c code, where i mostly get to use underscore case.
>>
>>54542213
If you are the only one writing the code then the answer is: It doesn't matter, just be consistent.

If you are part of a team/organization then you probably don't have a say unless you are in a high enough leadership position.
>>
under_fucking_score
Thread replies: 15
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.