Golang Magic: Package level vars, init
Magic
Sometimes code appears to be magic. Layer up on layer of abstraction followed through with crazy names and advanced tricks. Great for the writer and a show case of knowledge, bad for readability and maintenance. This article explores removal of said magic by simplifying what packages can do.
Intro
I’m currently levelling up my learnings with Golang and keen to maintain the heat and make use of this skill. So, when Peter Bourgon posted this http://peter.bourgon.org/blog/2017/06/09/theory-of-modern-go.html, I took note. I’ve never met Peter, but I like what I read. In summary , his post is about removing the use of package level vars and the implicitly called init() function.
I am the first to admit to using package level vars and init. My first reaction to reading the article was being irked. Why irked? Because it’s easy to use package level vars and once you understand what init() is and when it’s called. Not using package level vars means you have to think about relationships and what needs to be passed what. Not using init() means you have to think about how something is instantiated and whether it’s unique and if it should be globally Continue reading
It configures desktop computers as nodes to support compute or storage functions.
Hypervisor platform uses containers to isolate hacks from spreading to critical car functions.
Carrier virtualization, programmability and the massive data sets from machine learning and analytics are driving new requirements for data centers.