Application coding standards on side effects

22 views
Skip to first unread message

K.S. Bhaskar

unread,
Jun 24, 2025, 1:35:24 PMJun 24
to hard...@googlegroups.com, everyth...@googlegroups.com
Just wondering what applications do… If a caller calls abc(def), do application coding standards permit the code in abc() to have the discretion to change def, e.g., set def=$get(def)? In the most common case, it doesn't matter because calling abc() will make a private copy of the parameter. But if the caller, perhaps inadvertently on the part of the programmer, happens to call the function with an actualname, e.g., abc(.pqr),  then pqr will be changed.

Of course, this does not apply to cases where abc() is expected to change the passed parameter.

Thank you very much.

Regards
- Bhaskar

--
YottaDB - The most scalable key-value database engine in the world?
Find out for yourself.

Sam Habiel

unread,
Jun 24, 2025, 4:03:39 PMJun 24
to K.S. Bhaskar, hard...@googlegroups.com, everyth...@googlegroups.com
> do application coding standards permit the code in abc() to have the discretion to change def


The answer is yes, that usage is allowed.

--Sam

--
You received this message because you are subscribed to the Google Groups "Everything MUMPS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to everythingmum...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/everythingmumps/CAH%2BrS9dbWXAobGeOT3AjMLUrRywQ0CL2TMmhGyDzGye8N5YRRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages