Is there have best practice for function multiple dispatch? Some kind of Idiomatic or library?
e.g.
func hi (id :int): print(checkID(id)) func hi(name:String): print(name):
GDScript does not support function overloading. A function with a given name can only exist once. However, GDScript is dynamically typed, so if you omit type hints, you can do what your code shows in this way:
func hi(arg): if typeof(arg) == TYPE_INT: print(checkID(id)) elif typeof(arg) == TYPE_STRING: print(arg)