Prefix on all of ALFA's functions?

Scripted ALFA systems & related tech discussions (ACR)

Moderators: ALFA Administrators, Staff - Technical

Locked
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Prefix on all of ALFA's functions?

Post by Ronan »

Cipher has started adding a "ALFA_" prefix to all of the ACR functions. What do you guys think of this? I type out function names in the sidebar list pretty often, so I'm not a big fan of having to type 5 extra characters plus a shift. Not too big of a deal to me, though.

The upsides are pretty obvious, pretty much prevents any function name conflicts. Though honestly I don't see those being an issue for the ACR as a whole, since we won't use anything 3rd-party without looking over it and changing a few things. I think its more of an issue for server scripters, who might import more 3rd-party scripts to use and not know how to debug them if a naming conflict occurs (seen this in ALFA1 a few times, usually precedes a "Ronan can you help me with this script?" request in chat).
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

About the function lookup, I just tried it on my end and I see results where the search string matches any part of the function name.

Eg: function ALFA_SampleTestFunction()

Typing "Test" or "SampleTest" in the function lookup text box in the toolset would bring up ALFA_SampleTestFunction. As far as I know, it's always worked this way.
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

BTW, I found it interesting, and quite amusing, that I have now achieved the forum rank title of Illithid. As such, I'd just like to say ... do my bidding or I will feast on your brain matter!

How apropos? 8) :lol:
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Post by Ronan »

I may not have much brain matter to feast on, because I can't get that damn function lookup to work with anything other than in-order typing. :?
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

Does anyone else have this problem? Can you give me an example of what isn't working on your end, Ronan? I wonder if we're talking about the same thing now....
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Post by Ronan »

err, nevermind ;) I was typing on the list itself, instead of into the filter text box. Works fine doing it the later way of course. ALFA_ it is.
User avatar
Nerine
Skeleton's Knuckle
Posts: 23
Joined: Fri Jun 18, 2004 3:05 pm
Location: Bucks, UK GMT+1 (BST)

Post by Nerine »

If it is just for core rules then I'd say ACR_ would be better than ALFA_ plus it'd probably be good to prefix that to ALL core rule objects - not just functions.
Nerine Galatea
ADM: ALFA006 - The Long Road

Member of ALFA2#07 - The Cold Lands
Image
User avatar
Fionn
Ancient Red Dragon
Posts: 2942
Joined: Sun Jan 04, 2004 7:07 am
Location: Seattle, WA

Post by Fionn »

Nerine wrote:If it is just for core rules then I'd say ACR_ would be better than ALFA_ plus it'd probably be good to prefix that to ALL core rule objects - not just functions.
Any chance we can put these at the end of the alphabet? If they are HAK scripts, it won't matter, but anything going into ACR really needs to be out of the builder's way.
PC: Bot (WD)

Code: Select all

     -----          -----          -----          -----
    /     \        /     \        /     \        /     \
   /  RIP  \      /  RIP  \      /  RIP  \      /  RIP  \      /
   |       |      |       |      |       |      |       |      |
  *| *  *  |*    *| *  *  |*    *| *  *  |*    *| *  *  |*    *|
_)/\\_//(/|_)(__)/\\_//(/|_)(__)/\\_//(/|_)(__)/\\_//(/|_)(__)/\\_(
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Post by Ronan »

Fionn wrote:Any chance we can put these at the end of the alphabet? If they are HAK scripts, it won't matter, but anything going into ACR really needs to be out of the builder's way.
If said functions aren't being used, they'll be marked with an underscore for "private", and get pushed out of the way. If they are something that is used from whatever include files the builder is using, he probably won't want them out of the way.

Though I still prefer no prefix for public functions, I do like ACR_ over ALFA_. Its more descriptively global, and shorter.
User avatar
Damart
Dim Wit
Posts: 231
Joined: Sat Jan 03, 2004 9:51 am
Location: GMT-ish

Post by Damart »

And there i was thinking the "A"in ACR was for Alfa
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

I was torn between ACR and ALFA initially but went with the latter simply because it was generic. I think generic labels work better for use as a global standard, but it's a minor issue.

We'd have to rework all scripts, not just Ronans, if we use ACR though. :lol:
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Post by Ronan »

Heh, I already have reworked most of my stuff to ACR_, actually... Just need to commit it. I think it works to better distinguish any server-specific stuff from the ACR, since ALFA is a bit more ambiguous in that sense. Plus, all the files are named acr_ (though in NWN2 we'll get 32 byte filenames, so the shortness is less of an issue).
Locked