Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!
RuneMate will permanently shut down on August 7, 2026
due to events outside our control. You can continue using RuneMate until this date after which it will no longer be available. Thank you to everyone that contributed to RuneMate's success and to the community for the opportunity to serve you all these years.

  • Learn about RuneMate Vault and how its zero knowledge local encryption already protects your sensitive information.
  • Edit or delete your RuneMate account from your Account Settings.
  • All account upgrade subscriptions have been cancelled. No action required.

Request Make TreeBot treat null children properly

Joined
Dec 10, 2014
Messages
3,377
I'm the opposite, I wouldn't mind the idea but I'm definitely leaning in favour of restriction. In my opinion if you're going to have a branch with a null sub-node, that branch should be replaced by a leaf.
I think I get what you're saying, but there are cases where you can't replace that branch with a leaf easily and elegantly
 
Client Developer
Joined
Oct 12, 2015
Messages
3,817
I think I get what you're saying, but there are cases where you can't replace that branch with a leaf easily and elegantly

Can you think of one? Rather than the condition being returned in validate() it would just be an if statement within execute().
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
I'm the opposite, I wouldn't mind the idea but I'm definitely leaning in favour of restriction. In my opinion if you're going to have a branch with a null sub-node, that branch should be replaced by a leaf.
Thats like saying if you have a leaf in a tree (by definition a node without children), this leaf needs two leafs as children. It doesnt make sense to me
 
Can you think of one? Rather than the condition being returned in validate() it would just be an if statement within execute().
Gl with that if the subtree is fairly complex
 
Client Developer
Joined
Oct 12, 2015
Messages
3,817
Thats like saying if you have a leaf in a tree (by definition a node without children), this leaf needs two leafs as children. It doesnt make sense to me
 

Gl with that if the subtree is fairly complex

That's not what it's like saying at all.
 
I mean don't get me wrong I'm not against the idea, I just haven't come across a use case.
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
That's not what it's like saying at all.
Yes it is, you are saying that null children should be replaced with leafs. Well leafs are defined by having no/null children.
 
Client Developer
Joined
Oct 12, 2015
Messages
3,817
Yes it is, you are saying that null children should be replaced with leafs. Well leafs are defined by having no/null children.

No, I'm saying if you have a branch with one child, the branch and child should be consolidated into a leaf node.
 
Top