Home » SIRTECH CLASSICS » Jagged Alliance: Unfinished Business » Vanilla Modding » Lengthy Function Declarations
Lengthy Function Declarations[message #101330] Mon, 03 May 2004 11:19 Go to next message
Drakkcon is currently offline Drakkcon

 
Messages:21
Registered:August 2003
Location: USA
Looking at some of the header files, I see some of the longes function names I've ever seen in my life! Here's a gem:
FindGridNoFromSweetSpotExcludingSweetSpotInQuardent

not to mention the number of arguments it takes! Maybe a good project would be re-#define-ing all the function names:) Probably about a %30 increase in coding efficiency :rolleyes:

Note: I'm joking, not that n00bified Very Happy

Report message to a moderator

Private 1st Class
Re: Lengthy Function Declarations[message #101331] Mon, 03 May 2004 12:57 Go to previous messageGo to next message
markpoll is currently offline markpoll

 
Messages:101
Registered:November 2002
Location: sydney
Fair comment, but let's be nice to the SirTek people and not go too far down this path. It must be awful to be in the position of the SirTek people and have your work gone over in fine detail with 6 years of hindsight and without the time and other pressures they were likely under.

Report message to a moderator

Sergeant
Re: Lengthy Function Declarations[message #101332] Mon, 03 May 2004 22:50 Go to previous messageGo to next message
Lanfear is currently offline Lanfear

 
Messages:46
Registered:April 2004
Location: The Netherlands

hmmmm, from my point of view a long function name that describes exactly what a function does is a heck of a lot better than a short one that leaves you puzzling what on earth they're about...

especially in a project of this size, with multiple people working on the same source, it's absolutely vital to describe functions well, as well as comment abundantly.

in fact, the fact that i, never having touched C or any of its relatives until about 2 weeks ago, can actually make good sense of the code is a credit to the programmers for the way they documented the original code.

Report message to a moderator

Corporal
Re: Lengthy Function Declarations[message #101333] Tue, 04 May 2004 07:09 Go to previous messageGo to next message
Drakkcon is currently offline Drakkcon

 
Messages:21
Registered:August 2003
Location: USA
Yea it seems mean of me, until you find out that I was joking. The only choices they had were, use C++ (short function names, long class names), or what they did. I have absolutely no confusion about that function, but I did think it was funny Smile
I can just picture wrapping the code in classes:
FindGridNoFromSweetSpotExcludingSweetSpotInQuardent would be in my mind, tacticalmap.gridloc.location.find(BF_EXCLUDE SWEETSPOT, quardentloc); //what's a quardent Smile ?

The funny thing is, GCC based compilers only look at the first 27 characters of a variable of function name (not sure about VC), which likely proves their effort to remain clear.

Report message to a moderator

Private 1st Class
Re: Lengthy Function Declarations[message #101334] Wed, 05 May 2004 01:21 Go to previous message
markpoll is currently offline markpoll

 
Messages:101
Registered:November 2002
Location: sydney
@Drakkon. I didn't intend to have a go at you. I know you were joking. You even said so. But what I'd hate to see here is anyone (really) attacking the SirTek people saying how dumb they were - how clever I am etc.

Report message to a moderator

Sergeant
Previous Topic: JA2 Source - The Whitehat Project
Next Topic: Sighting Range
Goto Forum:
  


Current Time: Fri Jan 10 07:06:19 GMT+2 2025

Total time taken to generate the page: 0.00785 seconds