Wizzup?
2009-07-19 22:17:30
I believe that constants can make a huge difference in code readability, and also allow source code of a program itself to change, without affecting it's end users' code.
Take for example the latest GameTab() update in SRL. SRL now uses constants for each tab number, defined in SRL.
This is a great addition, and I believe every function in SRL should have it's own constants. (Only if it has arguments that are usually defined with numbers, or strings.)
It can GREATLY improve readability and backwards compatiblity.
I think this job would be tough one to do for a single developer, so I was hoping this could be done as a team of several members and/or developers?
Before we start off, we will need some general formula for creating constant names.
EG:
DropPattern(which: integer)
would have these constants:
First four characters of each function name + underscore and 4 characters of the next `Camelcase' part. And finally a underscore + short description of a constant?
Take for example the latest GameTab() update in SRL. SRL now uses constants for each tab number, defined in SRL.
This is a great addition, and I believe every function in SRL should have it's own constants. (Only if it has arguments that are usually defined with numbers, or strings.)
It can GREATLY improve readability and backwards compatiblity.
I think this job would be tough one to do for a single developer, so I was hoping this could be done as a team of several members and/or developers?
Before we start off, we will need some general formula for creating constant names.
EG:
DropPattern(which: integer)
would have these constants:
drop_patt_up_down = 1;
drop_patt_snake = 2;
First four characters of each function name + underscore and 4 characters of the next `Camelcase' part. And finally a underscore + short description of a constant?