Talk:Raycasting Basics

From Legacy Roblox Wiki
Jump to navigationJump to search

NXTBoy, if you don't mind me asking, why did you change everything to lowerCamelCase from PascalCase? Pokelover980 01:35, 22 July 2011 (UTC)

Well for a start, it removes the name collision of Ray as an object and a variable. It's good practice to use lowerCamelCase for variables in many languages. I'm open to debate as to whether functions should be PascalCase or lowerCamelCase.
07:35, 22 July 2011 (UTC)
Eh, I'm used to .Net and it's PascalCase, so that's why I used it. I decided to go against defining the ray in a separate variable for efficiency's sake (even if it's a very small difference, I'm still an efficiency freak :P), but I do like the way you spaced things out in the first sample. But I might change some of the things back to PascalCase since Roblox seems to be changing to it, and I'd like for new players to follow the conventions Roblox does so things are less confusing for them :P Not now though, and I'll probably forget about it and not change it at all, but whatever, I'm lazy. Pokelover980 01:44, 23 July 2011 (UTC)
I'm a .NET (C#) programmer as well. However, in C#, classes and members are capitalized, but local variables, and presumably local functions if they existed, are capitalized. A case in point is the i in a for loop.
07:55, 23 July 2011 (UTC)