Skip to main content
5 events
when toggle format what by license comment
Jul 14, 2017 at 21:00 comment added Cort Ammon +1 To your point, I've seen MATLAB simulations that rely on global variables to pass data. The result was completely unreadable because it was so hard to tell which variables were parameters to which function.
Jul 14, 2017 at 16:44 comment added Bill K Absolutely, a global variable IS a hidden parameter.
Jul 13, 2017 at 15:49 comment added Tulains Córdova +1 for stating that both many parms and global vars are bad. But I want to clarify something. In most languages, primitive parameters are passed by value by default (Java), and in others you can pass them by value explicitly (PL/SQL). In the other hand global primitives are always accessed by reference (so to say). So parameters, at least of primitive types, are always safer than global variables. Although of course having more than two or three parameters is a smell, and having twelve parameters is a huge smell that shoule be refactored.
Jul 13, 2017 at 14:02 comment added Jared Smith To you a +1, be it a toilet or a commode they reek the same. Nice job pointing out the wolf in sheep's clothing.
Jul 13, 2017 at 8:31 history answered Quentin CC BY-SA 3.0