#93564 - 2002-09-02 09:26 PM
Should UDF collections be allowed?
|
kholm
Korg Regular
   
Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
|
Should UDF collections be allowed?
I could create this as a poll, but i would rather raise it as a discussion
I sent this post Collection of UDF's for Excel under the assumption that UDF's are always 'standalone', but should they always be?
In my oppinion, in some situations a collection are more usefull, specially when they include COM objects. You don't have to create/destroy a handle for each function call (Better performance), and you can minimize the number of parameters nessasary (Smaller code)
An example could be Sealeopard's DB/SQL functions. They are not as dependant as my Excel functions, but it would be easyer to make an explaining example script.
My question is: Should UDF collecttions be allowed in the UDF forum, and if so should global variables be allowed?
Of course i could be veto'ed out by DrillSergeant
-Erik
|
|
Top
|
|
|
|
#93566 - 2002-09-02 10:04 PM
Re: Should UDF collections be allowed?
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
We wouldn't need Global VARS if we could define functions within functions or more accurately if we could define functions within a specified named block or package.
That way all vars for a UDF collection would be held within a named container.
|
|
Top
|
|
|
|
#93568 - 2002-09-02 10:40 PM
Re: Should UDF collections be allowed?
|
kholm
Korg Regular
   
Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
|
Howard,
I like your idea of contained functions and variables, that would include semi-globals(scope variables). Anyway this would be laying another burden on Ruud's shoulders: Allowing functions inside functions AND scope of called scripts only vissible from current block!
I avoid globals if possible. But if i have a reason i will use globals. Reasons still being faster executing or smaller code. The smaller code dosn't way heavy though.
Please don't start another dicussion of 'allowed globals' like: $, $_, $i, $j, $RC.... whatever
-Erik [ 02. September 2002, 22:52: Message edited by: kholm ]
|
|
Top
|
|
|
|
#93572 - 2002-09-03 07:11 PM
Re: Should UDF collections be allowed?
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Hey - very cool - it works beautifully !!!
code:
Break On ? Object.Method("Text123") Exit 1 Function Object.Method($Text) ? "text = $text" EndFunction
Did I mention Happy 2K Jens ?
|
|
Top
|
|
|
|
#93576 - 2002-09-06 02:34 AM
Re: Should UDF collections be allowed?
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
Congrats on the 2k posting Jens. Really nice to have good people like you on the board.
As for this topic... I don' mind "new" functionality, but DON'T lose sight of the fact that KiXtart is a LOGON script processor designed to help Network Administrators perform their job more easily.
By me saying Network Administrator, I'm meaning that at least a few of you guys on the board have programming backgrounds and or do it on the side, whereas I would think (IMHO) that most Network Administrators have little to no background in programming (myself included).
So, having new or enhanced functionality is great, but when options or features are "mandated" or forced as the "default" that only make it easier on those with some programming skills under their belts, I think is a step in the wrong direction.
If we want it all VB or .NET like, then why not just jump ship and use VB (We don't because KiX is often easier).
So Ruud, please continue to make it a very robust, powerful, easy to use program.
Okay, well that is my opinion on the subject. Bring on new stuff, but don't force C, or OO type classes onto masses that may or may not understand how to use it.
|
|
Top
|
|
|
|
#93577 - 2002-09-06 02:50 AM
Re: Should UDF collections be allowed?
|
Redback
Getting the hang of it
Registered: 2002-03-20
Posts: 71
Loc: Albury Wodonga, Australia
|
Having all kinds of funky advanced features is all well and good, but you need to make things so that you dont have to use these things
we dont want to scare to many people away
GW Jens 2k
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 937 anonymous users online.
|
|
|