Making the move from Scala to Go
Since they cite me (and my essay from 2014) as part of their decision making process, I want to throw in 2 cents here. They ended up deciding on Go, whereas I have ended up preferring Clojure, yet I agree with a lot of what they say, so I&#x27;ll try to clarify why I ended up with a different decision than what they made.<p>I understand what they mean when they write:<p><i>I think the first time I appreciated the positive aspects of having a strong type system was with Scala. Personally, coming from a myriad of PHP silent errors and whimsical behavior, it felt quite empowering to have the confidence that, supported by type-checking and a few well-thought-out tests, my code was doing what it was meant to. </i><p>There are times when I appreciate the strict type-checking that happens in Java. I do get what they mean. But there are also a lot of times when I hate strict type-checking (in particular, when dealing with anything outside of the control of my code, such as whimsical, changing 3rd party APIs that I have to consume (for some business reason), or even 1st party APIs that feel like 3rd party APIs because they are developed by another team (within the same company) or for some reason we can not fix the broken aspects of some old API that was developed in-house 6 years ago.) Because of this, I have become a proponent of gradual typing. If I am facing a problem that I have never faced before, I like to start off without any types in my code, and then, as I understand the problem more, I like to add in more contract-enforcement. This is what I attempted to communicate in my essay &quot;How ignorant am I, and how do I formally specify that in my code?&quot; [1]<p>I think everyone who works with Clojure sometimes misses strict type-checking. Because of this, there have been several efforts to offer interesting hybrid approaches that attempt to offer the best of all worlds. There is Typed Clojure for those who want gradual typing, and there is more recently Spec. Given what I&#x27;ve written, you might think I am a huge fan of Typed Clojure, but I&#x27;ve actually never used it for anything serious. The annotations are a little bit heavy. I might use it in the future, but for now, I am most excited about Spec, which I think introduces some new ideas that are both exciting for Clojure, and which I think will eventually influence other languages as well.<p>Do watch the video &quot;Agility &amp; Robustness: Clojure spec&quot; by Stuart Halloway. [2]<p>I also sort of understand what they mean when they write this:<p><i>No map, no flatMap, no fold, no generics, no inheritance… Do we miss them? </i><p>There are times when we all crave simple code. Many times I have had to re-write someone else&#x27;s code, and this can be a very painful experience. There are many ways that other programmers (everyone who is not us, and who doesn&#x27;t do things exactly like we do) can go wrong, from style issues such as bad variable names to deeper coding issues such as overuse of Patterns or using complex algorithms when a simple one would do. I get that.<p>All the same, I want to be productive. And to be productive in 2017 means relying on other people&#x27;s code. And, in particular, it means being able to reliably rely on other people&#x27;s code -- using other people&#x27;s code should not be a painful experience. Therefore, for me, in 2017, one of the most important issues in programming is composability. How easy is it for me to compose your code with my code? That is a complex issue, but in general, those languages that allow for high levels of meta programming allow for high levels of composability. Both Ruby and Javascript and Clojure do well in this regard, though Ruby and Javascript both have some gotchas that I&#x27;d rather avoid. In all 3 languages, I find myself relying on lots of 3rd party libraries. I use mountains of other people&#x27;s code. Most of the time, this is fairly painless. But there are some occasionally painful situations. With Ruby I run the risk that someone&#x27;s monkeypatching will sabotage my work in ways so mysterious that it can take me a week to find the problem. And Javascript sometimes has the same problem when 3rd parties add things to prototype, perhaps using a name that I am also using. I so far have had an almost miraculous time using Clojure libraries without facing any problems from them. It&#x27;s this issue of composability that makes me wary of Go. While I sometimes crave a language that simple, I can&#x27;t bring myself to give up so much of modern languages best features.<p>[1] <a href="http:&#x2F;&#x2F;www.smashcompany.com&#x2F;technology&#x2F;how-ignorant-am-i-and-how-do-i-specify-that" rel="nofollow">http:&#x2F;&#x2F;www.smashcompany.com&#x2F;technology&#x2F;how-ignorant-am-i-and...</a><p>[2] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=VNTQ-M_uSo8" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=VNTQ-M_uSo8</a>