Page 1 of 1
Prefix on all of ALFA's functions?
Posted: Mon Aug 14, 2006 6:57 pm
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).
Posted: Mon Aug 14, 2006 7:51 pm
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.
Posted: Tue Aug 15, 2006 9:18 am
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?

Posted: Tue Aug 15, 2006 9:25 am
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.

Posted: Tue Aug 15, 2006 10:11 am
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....
Posted: Wed Aug 16, 2006 2:02 am
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.
Posted: Thu Aug 24, 2006 9:20 am
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.
Posted: Thu Aug 24, 2006 3:37 pm
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.
Posted: Thu Aug 24, 2006 9:38 pm
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.
Posted: Thu Aug 24, 2006 10:39 pm
by Damart
And there i was thinking the "A"in ACR was for Alfa
Posted: Wed Sep 06, 2006 1:36 am
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.

Posted: Wed Sep 06, 2006 1:47 am
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).