mIRC Home    About    Download    Register    News    Help

Print Thread
Recursion #89325 05/07/04 07:18 PM
Joined: Jul 2003
Posts: 33
B
Bilge Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jul 2003
Posts: 33
My attention has been drawn to the second paragraph of the aliases section of the help file which states that recursion is not supported because it "causes more problems for users that it solves". I can only make guesses as to what this implies but it sounds like scripters are too incompetent to know what they're doing. On the contrary, I can state that without recursion it causes me the problem that my scripting problem can't be solved. To me that's more serious than the possibility of an infinite loop and subsequently the possibility of wasted memory or whatever else.

It has also been bought to my attention that it is possible to workaround this deliberate limitation using various methods as long as you're happy to call an alias as a command and not an identifier. Since it is possible to implement recursion despite having to write ugly code and because I feel that being able to write recursive functions is a necessity I sincerely hope that this limitation can be lifted in time for the next version of mIRC.

Re: Recursion #89326 05/07/04 07:30 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Recursion would be very useful in some situations. Perhaps something like a switch for the /alias command that sets it to allow recursion would be useful - that way it wouldn't affect the current generation of scripts that might rely on an alias' non-recursiveness and would also mean it would take a conscious effort on the scripters part to enable recursion, effectively removing the problems of scripters who don't intend to use recursion from getting tripped up by it. Of course that would probably mean that you couldn't put recursive aliases in the Aliases section of the Script Editor but that's not much of a sacrifice.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: Recursion #89327 05/07/04 08:38 PM
Joined: Jul 2003
Posts: 33
B
Bilge Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jul 2003
Posts: 33
That sounds like an excellent idea.