Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #4250 > unrolled thread

Multilevel data structure, what to pass to functions?

Started byVictor Porton <porton@narod.ru>
First post2014-04-19 17:35 +0300
Last post2014-04-19 17:35 +0300
Articles 1 — 1 participant

Back to article view | Back to comp.programming


Contents

  Multilevel data structure, what to pass to functions? Victor Porton <porton@narod.ru> - 2014-04-19 17:35 +0300

#4250 — Multilevel data structure, what to pass to functions?

FromVictor Porton <porton@narod.ru>
Date2014-04-19 17:35 +0300
SubjectMultilevel data structure, what to pass to functions?
Message-ID<liu1ke$ogq$1@speranza.aioe.org>
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

[toc] | [standalone]


Back to top | Article view | comp.programming


csiph-web