Forum OpenACS Q&A: Why is acs_user__new defined twice

Hi,

I was wondering why is the function acs_user__new defined twice in

packages/acs-kernel/sql/postgresql/community-core-create.sql

Thanks

Koroush

Collapse
Posted by Yonatan Feldman on
the function is being overloaded to provide the proper defaults without having to pass them in every time.
Collapse
Posted by Koroush Iranpour on
So how do you know which one you are calling when you write code.
Collapse
Posted by Yonatan Feldman on
it is decided by the arguments you send it. either you send the arguments that match one signature or the other.
Collapse
Posted by Koroush Iranpour on
While you send the arguments for one the other does not complain with something like "wrong number of arguments"? Pretty smart I must say. Thank you for the clarification.