Having a misunderstanding about calling down

Rookie here

Why do people recommend calling down from parents ?

Have I simply not used it enough or it is in fact unsafe ? Because everytime I see tips about scripting organization, everyone tell that you need the parent node to call down their childs. However, everytime I try to apply it, I always find it pretty unsafe since the engine can’t tell you that the child has in fact this method. Yes, there is “has method” but even with that, you can’t be sure in the editor if it has it or not.

Do I have a bad definition of an “unsafe” practice ?

The editor can cell you if the method is there prior to runtime if you use static typing, i.e. if you declare the exact type of the node reference.

Using signals is probably safer because you can change the position of your object without breaking anything. It depends on the size of your program. I call down all the time because I know I won’t change the position of the child and it’s very convenient in Godot. I make sure the children are in the scene of the parent.

I think calling down is simpler because you more or less know the nodes you will find downstream, and a node downstream can not exist if the node you are calling from doesn’t exist yet. Upstream and around the entire scene is a lot more messy. Nodes may or may not exist at the moment and so forth.

Yeah I knew about the signals but it’s often said that you use it from child to parent more than the opposite

Oh great ! Thank you for the tip

It’s kinda misleading to say that a signal is a child to parent communication. When a child emits a signal it doesn’t really know (or care) who will receive it. It’s still parent’s responsibility to connect itself to a child signal, and to decide whether should it do something when it receives it or not. The parent is in control in both cases. And rightfully so because it’s higher up in the hierarchy. A child should never command the parent what to do. The opposite should always be the case.

In other words - a call from the parent to a child is direct control. Connecting to a child’s signal is also direct control. However, emitting a signal is not direct control.

Oh ok. That’s why signal are also the core of sibling to sibling communication