Pergunta

I feel understanding why data flow is higher level than control flow is key to writing good code (and convincing others during code reviews). I find this repeatedly when arguing why my functional style programming with immutability is superior to their mutable state code which is more common and expected.

But I don't understand why one is higher level than the other. The closest I can come up with, informally, is that ultimately end users don't care about what movement of control occurred. But they DO care what movement of data took place.

Other examples

  • applications which just do processing last only a couple of years, whereas files which store data can last decades)
  • a CPU just transforms volatile data, whereas disks store data persistently

In other words, control flow is a means of achieving data flow.

Is there a more rigorous way to explain this?

enter image description here
(source: slideplayer.com)

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
Não afiliado a cs.stackexchange
scroll top