gorbac icon indicating copy to clipboard operation
gorbac copied to clipboard

why not return error when setting parents if there is a circle error

Open nullne opened this issue 8 years ago • 2 comments

Several advices:

  • SetParent, if you set 1 to a, then a == 1, but SetParent is more like AddParent
  • If there are some potential circle errors, they should be thrown immediately rather than at runtime

nullne avatar Jul 04 '17 08:07 nullne

I would agree with the first point and it will be improved.

The second one, if we put circle detecting to the function it will reduce the performance significantly.

I suggest using InherCircle manually and adding it to each SetParent call if detecting circle errors is the key step to you.

Thank you!

mikespook avatar Jul 05 '17 00:07 mikespook

By the way, thank you for your work

nullne avatar Jul 05 '17 16:07 nullne