Talk:Lua Style Guide: Difference between revisions
>Merlin11188 |
>NXTBoy |
||
Line 10: | Line 10: | ||
:::I agree with MrNicNac here. Plus the style that is generally used in Lua is luacase, so if there's anything we actually ''could'' recommend, it's to name all the variables completely lowercase. | :::I agree with MrNicNac here. Plus the style that is generally used in Lua is luacase, so if there's anything we actually ''could'' recommend, it's to name all the variables completely lowercase. | ||
:::Whether it's easier or not doesn't matter. {{User:JulienDethurens/signature|date=18:13, 22 January 2012 (UTC)}} | :::Whether it's easier or not doesn't matter. {{User:JulienDethurens/signature|date=18:13, 22 January 2012 (UTC)}} | ||
:::I guess I'm with you there. Wikis shouldn't be biased. However, I'm not sure that advocating lowerCameCase over PascalCase is any worse than advocating spaces between operands over no spaces. Why is one biased and the other not? | |||
:::Do you reckon simply changing the wording to be less biased would suffice? {{User:NXTBoy/sig|date=20:06, 22 January 2012 (UTC)}} | |||
== Convention? == | == Convention? == |
Revision as of 20:06, 22 January 2012
I wrote mine first =P These two articles should be merged. This is the better title.
- Yours isn't the same. The style guide is all about how to name identifiers and typeset code. Yours is more about writing code that does things in the right way, and how it is valuable to comment.
- That's true. I'll leave mine up, and redirect them here when they just have bad style :D
lowerCamelCase
I believe the part that says they should write their code in lowerCamelCase is completely biased. There are many scripters that use camelCase and many scripters that use PascalCase and neither is better than the other. There are recommendations that are universal, such as indenting, but camelCase is definitively not. There are even users that use underscores (I sometimes do), or no spaces at all (which I'd name luacase, as that's how the Lua libraries actually work: gsub, newproxy, getfenv, setmetatable, etc). I think we should remove that part.
- camelCase is much easier to look at, and almost all professional programmers use it. It's a good habit. PascalCase just looks ugly, and it's much less typing-efficient. If you were typing Hello all the time instead of hello, it's slower. If you were typing HelloWorld, it's again slower, but if you were typing helloWorld, you can see where the word begins, so it's a visual aid, and also not have to press shift twice.Trappingnoobs (Writer) Have I done something bad? Good? Tell me on my talk page 17:58, 22 January 2012 (UTC)
- It does not matter what looks ugly or what most people use. It should never be said that one should be used over another. They should both be presented with no compliments or arguments. Just how they are. No biased nature on Wikis. ☩MrNicNac - Wiki Editor ☩
- I agree with MrNicNac here. Plus the style that is generally used in Lua is luacase, so if there's anything we actually could recommend, it's to name all the variables completely lowercase.
- Whether it's easier or not doesn't matter.
- I guess I'm with you there. Wikis shouldn't be biased. However, I'm not sure that advocating lowerCameCase over PascalCase is any worse than advocating spaces between operands over no spaces. Why is one biased and the other not?
- Do you reckon simply changing the wording to be less biased would suffice?
- It does not matter what looks ugly or what most people use. It should never be said that one should be used over another. They should both be presented with no compliments or arguments. Just how they are. No biased nature on Wikis. ☩MrNicNac - Wiki Editor ☩
Convention?
Crazy NXTBoy...but anyways. I'm in favor of following through with Julien's removal of the biased information. †MrNicNac - Wiki Editor †
- I have already discussed it on the talk page, and I don't believe bias should be welcome on a wiki. So what should be done?
- There is nothing to discuss. The Wiki should not be biased and it is agreed that the previous text is biased.†MrNicNac - Wiki Editor †
- But we can still cheat and write that pascalCase is the general preference, right? It's not bias, it's a foundation-less fact! And liking examples hardly counts as a bias =P
- Let's just tell them to use CRaZyCaSE. You just capitalize random letters. It's easy and simple!
- We should tell them about common conventions regardless, like camelCase, PascalCase, and luacase, without recommending any of them.
- Let's just tell them to use CRaZyCaSE. You just capitalize random letters. It's easy and simple!
- But we can still cheat and write that pascalCase is the general preference, right? It's not bias, it's a foundation-less fact! And liking examples hardly counts as a bias =P
- There is nothing to discuss. The Wiki should not be biased and it is agreed that the previous text is biased.†MrNicNac - Wiki Editor †