|
| 18 Oct 2016 09:45 AM |
Pascale case seems so much more natural than camel case. One of the aims of higher level languages such as Lua is to make it closer to English, and writing NewAnimation seems more 'englishy' then newAnimation.
I can understand shortening code by not writing out the full word, so like "NewAnim", I do it myself. But camel case makes no sense to me.
Any thoughts?
WolfgangVonPrinz // Private Drive - Residents Only |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2016 09:52 AM |
Now that I think about it, I have no idea Using underscores would be the best option since they provide better readability
#someIdIMadeEarlier{ font-size:2em; } #some-id-i-made-earlier{ font-size:2em; }
https://www.roblox.com/library/499105467/Hillary |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2016 09:55 AM |
*Promotes uses of _ underscores * Uses - hyphens
WolfgangVonPrinz // Private Drive - Residents Only
WolfgangVonPrinz // Private Drive - Residents Only |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2016 09:56 AM |
I agree with you though, however, hyphens are harder to type than just doing nothing at all, and while it probably adds up to MAYBE a couple of minutes over the course of time you'll ever program, people are lazy af fam
WolfgangVonPrinz // Private Drive - Residents Only
WolfgangVonPrinz // Private Drive - Residents Only |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2016 10:04 AM |
I took the example from an article titled "CSS: CamelCase Seriously Sucks!"
- "hyphens are harder to type than just doing nothing at all" It's kind of like comments Spend a little time now to make them to save a lot of time in the long run
https://www.roblox.com/library/359444683/H-W-A-Arrow |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 18 Oct 2016 10:50 AM |
I like camelCase because it gives better readability imo
|
|
|
| Report Abuse |
|
|
wish_z
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 233 |
|
|
| 18 Oct 2016 10:51 AM |
| i just like how camelcase looks lol |
|
|
| Report Abuse |
|
|
S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
|
| 18 Oct 2016 10:59 AM |
| It's better and it distinguishes things in languages like Java where PascaleCase is used for classes |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 18 Oct 2016 11:01 AM |
| I use Pascal case for function/method names, camel case for parameter/local variable names |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 18 Oct 2016 11:04 AM |
| For me I use Pascal for tables, functions, and events, and I use camel for variables and object names. |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2016 11:17 AM |
Also, camelCase, sadly, has become an industry standard. Although in some cases, Pascale is used, it's not "respected" enough and programmer's are forced to stick with industry standards most of the time.
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2016 11:17 AM |
| Because more powerful languages like Java and C++ have camelCase as a requirement for variables. Doing it in Lua is just practice and doesn't hurt anything. Same for putting ; at the end of lines. Lua doesn't mind it, but it's good practice when you regularly program in those languages. |
|
|
| Report Abuse |
|
|
S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
|
| 18 Oct 2016 11:24 AM |
| Why are industry standards a bad thing? Universal convention is great because it increases readability to programmers that didn't necessarily write the program. |
|
|
| Report Abuse |
|
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 18 Oct 2016 11:24 AM |
| I use camelcase in function names and pascal case in total-scope variables and lowercase in local variables, because i = stupid |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2016 11:27 AM |
@S1x Because the industry standard isn't always the best thing that could be used...
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 18 Oct 2016 11:28 AM |
| Uh Riney, you're completely wrong. |
|
|
| Report Abuse |
|
|
S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
|
| 18 Oct 2016 11:34 AM |
| @iCherry But ########## has no real advantage over camelCase other than its appearance. #### Hows he wrong? I know there are at least a few languages that distinguish between these cases, including Java. |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2016 11:35 AM |
@S1x I agree, I prefer camelCase. But I'm just clarifying that the industry standard is not always best.
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
|
| 18 Oct 2016 11:37 AM |
Smh the stupid things roblox censors
Apparently Pascal()Case is inappropriate, as well as (at symbol)(first 3 letters of cntkillme) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 18 Oct 2016 05:42 PM |
| Because C++ doesn't care and Java doesn't care for variables, only class names/methods IIRC. |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2016 05:52 AM |
But, WHY is it the industry standard?
WolfgangVonPrinz // Private Drive - Residents Only |
|
|
| Report Abuse |
|
|
S1xty
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2712 |
|
| |
|
|
| 19 Oct 2016 09:54 AM |
| Because pressing shift is hard work, and the capital letters are only really there to mark the beginnings of new words, because we can't have spaces |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 19 Oct 2016 11:07 AM |
Speed is not a reason It's just preference
I spend most of my time thinking when I program, not pressing shift or holding shift and pressing the minus symbol. |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2016 10:56 AM |
Speed is a reason?
"Why do you type like that"
"I like the speed of it"
"Oh nice"
Preferences are also reasons
WolfgangVonPrinz // Private Drive - Residents Only |
|
|
| Report Abuse |
|
|