Quantcast
Channel: All LabVIEW posts
Viewing all articles
Browse latest Browse all 203131

Re: Preallocate array memory without initializing it

$
0
0

Ah, just remembered this...

 

Even if I want a singleton, I usually try to make it by wire!

 

This is very inconvenient, you need to pass the wire though all the code, why would you want to do this?

 

Well, it forces me to thing about coupling. Or de-coupling actually. If I have at some point 30 modules, that are potentially reusable, I don't like to find out I've but singletons to other modules. If you make for instance a log singleton, it simply does not belong inside a completely unrelated module A. If module A needs to log, adding the log singleton does not belong inside module A. Failing to decouple the two, will eventually make one big clutter of code. Code dedicated to that single application, and not reusable. Potentially of course, but it tends to happen at least to some degree. 


Viewing all articles
Browse latest Browse all 203131

Trending Articles



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