Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #4250
| From | Victor Porton <porton@narod.ru> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Multilevel data structure, what to pass to functions? |
| Date | 2014-04-19 17:35 +0300 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <liu1ke$ogq$1@speranza.aioe.org> (permalink) |
The task is to generate a data structure to be passed for further
processing.
I have a multilevel hash/array. It is modified by some functions (which I am
now rewriting). Should I pass the top level hash to the function or just
that part which is to be modified?
An other variant: $x{a}{b} = myFunction(...);
An argument to pass the whole structure is that this does not require to
change function calls if in the future we decide to modify more in a
particular function.
An argument to pass only a modified portion is that we can pass a portion
which is not yet assigned to a key (and even whose parent may be not
assigned to a key) in the entire data structure.
More arguments, ideas?
--
Victor Porton - http://portonvictor.org
Back to comp.programming | Previous | Next | Find similar | Unroll thread
Multilevel data structure, what to pass to functions? Victor Porton <porton@narod.ru> - 2014-04-19 17:35 +0300
csiph-web