Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 223

Comment by Peter - Reinstate Monica on Should I go with if-else or match-case in the below scenario?

$
0
0
I don't know dataweave or mule, but in general: Often, there is a third choice: Use a dictionary/associative container that maps the inputs to outputs. That is a specific case of a general choice between modeling relations in code vs. modeling them in data structures. (Admittedly, an associative container is a little less elegant if not every input can be mapped to an output, as in your case, so that there is a default.)

Viewing all articles
Browse latest Browse all 223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>