|
On 11/21/2010 4:59 AM, Luiz Henrique de Figueiredo wrote:
It is not a good reason to CAPTIALIZE a FUNCTION name.The all-caps names in bit32 are clearly not ideal but I don't see that they warrant such a fuss. Yes, they look like assembly directives and that's on purpose. Of all the alternatives we considered (like the ones suggested here), this one sucked less and had the clear advantage of being different yet consistent with common asm use. If you think the all-caps names are shouting, please do use your own local names (or even rename them directly in bit32). No one wants to write code with complicated expressions involving bit32.AND and bit32.XOR, whatever the actual names are.
Oh good, the high priesthood is talking :-) Good, some feedback is better than one-way traffic.
To me it's just a library. No different from the rest. Why does it have to look different? We did fine before with lower case.
Leaving aside the aliasing, many people are attuned to having all caps as constants.
I think only ancient assembly code users insist on having all caps as mnemonics. All caps as mnemonics was never necessary, it was merely due to keyboards and terminals having defaults of upper case. Remember COBOL, FORTRAN, BASIC? *Everyone* has moved on from all caps. All caps is not modern practice. Caps Lock and Shift are being used less and less.
When I write assembly language these days, it's in all lower case except for constant equates. This is consistent with common use of constants in C for instance, and one becomes attuned to quickly scanning source code patterns in that way. For embedded programming people, bit manipulation is routine and I don't see why bit32 functions has to look special. High-speed kernels like graphics kernels or crypto are often in assembly -- maybe they use upper case -- but they are pretty static write-once rarely-touched blocks of code and is *very* different from code worked on daily.
I don't think "common asm usage" is a valid rationale at all.Complicated expressions can be written with bit32.band etc also, if the user chooses to do so. When performance is not an issue, then there is no problem. No kittens will die. I thought one time the top duo even said using globals are very fast and not too bad compared to locals on the list. But now you are saying that aliasing using locals is standard practice? Whatever happened to simplicity that aliasing using locals is now such a virtue? Also when I alias, I try to stick to the same names. Having custom names for aliases means different usage in different programs from different places and unnecessary comprehension effort.
The arguments put forward to justify the change is not convincing in the least.
It's just a library. They are just functions and methods. It's not assembly code. Lua looking like assembly code (maybe because it was easy to port stuff like that) is not a virtue.
I have said my spiel and I'll slither away for now. -- Cheers, Kein-Hong Man (esq.) Kuala Lumpur, Malaysia