18 ms·
Go Turns 10
- K0SM0S 7y agoHappy birthday to a wonderfully refreshing language. > Go has also found adoption well beyond its original cloud target, with uses ranging from controlling tiny embedded systems with GoBot and TinyGo to detecting cancer with massive big data analysis and machine learning at GRAIL, and everything in between. I've often thought of this, but I'm not qualified enough to answer my own questions. While a very expressive and extendable language like Python seems well suited to researching the desired abstractions when designing neural nets and ML paradigms, it seems to me that a production phase would benefit from translating it to a 'sleek' language like Go — which forces you to think closer to the machine, and opens boulevards to safe performance. I wonder what people fluent in Go and other languages, experienced with ML, think of this. (it's a minor concern overall, but the future of Go in ML is of interest to me) > especially the community working together. I have to say this is one of the nicest things for a Go programmer, a 'Gopher' as they say. I've been online since the late 1990's (teenager back then), in all sorts of communities, and being quite civil and empathic myself I tend to have strong opinions about the 'mindset' or 'culture' on a very down-to-earth human level. The Go community is among the very best. Period. One telling sign is how welcoming, respectful and elevating they are with newcomers, to Go or programming in general. It's a trainee's paradise, even if material is still relatively scarce compared to longer-established big names. > In fact, people often tell us that learning Go helped them get their first jobs in the tech industry. This should not go unnoticed. Few languages are able to move that needle — remember that for now, we increasingly need more developers than we can produce at a worldwide scale. It's both a matter of a language and its paradigm being in demand by employers, by clients projets; it's also a matter of said paradigm and implementation/spec to be conducive to the making of programmers. We know the names. C. Java. PHP. Python. COBOL before that (and I hear, today still). It's the big ones that consistently do it forever regardless of 'project / tech buzz flavor of the year or even decade'. I have every belief that Go is destined to join this select club of industry norms. Lots of reasons why but among the most fundamental are ticking all the right boxes at a low level — ease of programming, stellar readability and portability of others' code, really cross-platform target, self-documenting, etc. etc. Anyhow. Here's to a masterpiece.
- low_common 7y agoAgree with you on all of your points. I picked up Go in my senior year of college because it seemed interesting. None of my peers had heard of it. This led to my first job out of college where the company's backend was written in Go. Haven't looked back.
- dodobirdlord 7y ago> While a very expressive and extendable language like Python seems well suited to researching the desired abstractions when designing neural nets and ML paradigms, it seems to me that a production phase would benefit from translating it to a 'sleek' language like Go — which forces you to think closer to the machine, and opens boulevards to safe performance. This is a common perspective from outside of the ML field that arises usually from missing knowledge about the ML technology stack. Underneath the layer of expressive and exploratory Python lies a bedrock of optimized and domain-aware numerical libraries written in a combination of Fortran, C, C++, handwritten assembly and some HDLs. HPC resources are not cheap, so there is no software stack that provides a meaningful performance advantage over the one currently in use.
- K0SM0S 7y agoOK, I understand better. I was indeed thinking of whatever piece of code hits the metal last before kernel (including kernel actually), I see now that was badly worded in GP. This does strikes me as an interesting perspective though: > a bedrock of optimized and domain-aware numerical libraries written in a combination of Fortran, C, C++, handwritten assembly and some HDLs So, we're talking lower level, from the kernel and above but below TensorFlow and Keras etc. I take it? If yes, we're into systems by that point; it just so happens that this is Go's domain. Think of shrinking a 1000-brains 10-year cycle to a 100-brains 5-year or less (you may actually DevOps/CI-CD and sprint that stuff with Go like you would with most high-level's like Python or Js; a general "no-can-do" with low-level concurrent C++). I may be wrong or totally out of my depth here, but I'm speaking of the library layer where e.g. in compute you'd see a CUDA-based industry versus whatever else (OpenCL...) take about a decade to unfold (and as much to move back); same in graphics, you'd see DirectX / OpenGL/Vulkan market penetration play over the entire lifetime of a GPU architecture (not 'gen', the core design like e.g. GCN). I'm lacking the experience with ML workflows for sure; however the general hardware cycles and industrial market profiling seem to hold there as well (from GPU / TPU / FPGA / whatever fabrication, and the economics thereof; up to high-level software libraries and 'engineering muscle' that proponents of tech XYZ can push beyond marketing). Where Go fits in that landscape is not so much versus a data scientist's Python but rather against infrastructure / Ops people's C++. Like Go is currently a strong candidate to refactor (parts of) the COBOL space, because it's basically 10x faster than in C++ or Java. I'm thinking out loud. Don't quote me on any of this!
- jahaja 7y agoGo is such a productive language. Well deserved cred to its authors and community. Please, please hold firm against the inherent pressure from language theoreticians to add more features that increases complexity.
- jeffdavis 7y agoI think the tension is more between people writing executables and people writing libraries. If you want your language to be suitable for any purpose by using an intricate web of libraries depending on each other, you need those language features and deep theory. Think haskell, lisp, rust, etc. If you kind of know what people will use your language for, and you build in the most important functionality, you aren't nearly so dependent on libraries. You just make the language accessible and as productive as possible. Think Go, erlang, PHP, SQL, javascript, VB.
- gameswithgo 7y agowell said!
- jahaja 7y agoI honestly think that any language that enables too much cleverness will inevitably produce a mess given enough developers involved.
- icholy 7y agoYet the Go standard library is one of the best around ...
- jeffdavis 7y agoIt seems that you are agreeing with me. A standard library for a language with a purpose (like Go) should include a lot of stuff related to that purpose. That avoids the need for an intricate web of dependencies and specialized third-oarty code, but ties the language to its purpose a bit more. A standard library for a use-for-anything-and-everything language (like rust) might be smaller because it relies more on third-party libraries for the specific purposes you have in mind.
- mikece 7y ago"This pattern repeated for almost every language I looked at: it seems to take roughly a decade of quiet, steady improvement and dissemination before a new language really takes off." It does help when the company who created the language is Google and they start using it in significant products like Kubernetes. :-)
- bradfitz 7y agoKubernetes was almost written in Java. That it was written in Go instead was motivated in part by Docker choosing Go, which Google wasn't part of.
- kgraves 7y agoThat's great, amazing and all good, but at my company I am looking for people with at least 10 years (or more) experience with Go. :) /s
- ping_pong 7y agoIf you compare Go to C++, Go has gotten more organized but still retains understandability, and in my opinion, C++ has become unrecognizable. I did 10+ years of C++ until around 2012, and since then the changes have been so quick and so drastic I would not call myself an experienced C++ programmer anymore. It's a shame because I love C/C++ but not what I see today, because they have lost what makes Go great: an opinion. They are trying very hard to be everything and it has changed the language too quickly to keep up.
- sedeki 7y agoAlthough I share similar experiences with what you're saying per se, I don't understand why people compare Go to C++. Comparing Go to C makes sense; to Rust or C++ does not.
- ping_pong 7y agoI'm comparing it as a language that is evolving. Not as a point-to-point comparison. I feel like Go has evolved properly and C++ is mutating too quickly for its own good.
- sedeki 7y agoNah, C++ is hardly mutating, in the sense of being backwards-incompatible. Rather, it is expanding incrementally (these days in big chunks). Anyway... Would you compare Python and C++, then? The goals of the languages are clearly different.
- ohazi 7y agoThe comparison that has always made a bit more sense to me was "Rust tries to be a better C++, Go tries to be a better Java."
- speed_spread 7y agoHonestly, "Go tries to be a better BASIC" would be more accurate. Nothing wrong with that, mind you.
- sfg 7y agoThis makes me feel even older than the XKCDs that point out its longer from now to not-that-long-ago-seeming X from your youth than it is from X since very-ancient-seeming Y from your father's days.
- omani 7y agocan you share that xkcd pls?
- sfg 7y agohttps://xkcd.com/891/ https://xkcd.com/891/ is one, but I believe there are others.
- nindalf 7y agoHe really loves his "want to feel old" jokes. Also, want to feel old? The 'want to feel old?' factoid meme dates back to around 2011, closer to the Bush/Kerry election than to today. https://xkcd.com/1686/ https://xkcd.com/1686/ https://xkcd.com/1757/ https://xkcd.com/1757/ https://xkcd.com/1624/ https://xkcd.com/1624/ https://xkcd.com/1995/ https://xkcd.com/1995/ https://xkcd.com/1898/ https://xkcd.com/1898/ https://xkcd.com/1959/ https://xkcd.com/1959/ https://xkcd.com/1981/ https://xkcd.com/1981/
- misiti3780 7y agoPython : Django === Go : ?? If I want a nice ORM and built in migrations, what framework should I be using 10 years later?
- vthallam 7y agoYou don't have a single famous one because Go developers tend to hate frameworks and ORM's. If you are interested, I have wrote about some alternatives before here - https://hackernoon.com/the-myth-about-golang-frameworks-and-external-libraries-93cb4b7da50f https://hackernoon.com/the-myth-about-golang-frameworks-and-...
- eternalban 7y agoThe actual reason is that the language lacks the meta-programming facilities required for creating effective ORMs and certain frameworks. (Whether this is a good thing or a bad thing is a subjective matter.)
- sedeki 7y agoExactly. There's not much choice. The best approximations are considered hacks.
- tombert 7y agoWait, is that true? I thought that the Java packages like Hibernate were just using method attributes and reflection...doesn't Go have the ability to add attributes to structs and a working reflection library?
- zaphar 7y agoThey use generics pretty heavily too so it's not only reflection. Generics allow them to do a typesafe interface for the developer to use as well as making less work for the reflection code to do.
- eternalban 7y ago
- Koshkin 7y agoC++ within 10 years had conquered the world. Go, on the other hand...
- tptacek 7y agoHad it? As a software developer in the 1990s, I saw a lot more C than C++.
- wglb 7y agoI think that C++ was considerably more rare for many years during the conquest. JWZ had a long and interesting rant about it.
- hnarn 7y ago> C++ within 10 years had conquered the world. C++ is another language, and it conquered another world.
- SuddsMcDuff 7y agoC++ was invented in 1979. In 1989 the most popular programming languages, in order of popularity, were: 1. C 2. Ada 3. Pascal 4. Lisp 5. Fortran 6. C++ 7. Assembly 8. COBOL 9. BASIC 10. APL Source - https://youtu.be/Og847HVwRSI?t=120 https://youtu.be/Og847HVwRSI?t=120
- Koshkin 7y agoMore accurately, "In 1982, Stroustrup started to develop a successor to C with Classes, which he named C++". (Source - Wikipedia.) As far as Go's popularity, see e.g. https://fossbytes.com/most-popular-programming-languages/ https://fossbytes.com/most-popular-programming-languages/.
- SuddsMcDuff 7y agoTrue enough, one could name any year between 1979 and 1985 as the "invention" year of C++, and the claim would have some merit. http://www.cplusplus.com/info/history/ http://www.cplusplus.com/info/history/
- Koshkin 7y agoCongrats! When a man's gotta Go, he's gotta Go!
- iaabtpbtpnn 7y agoTen years old and still basically Java 1.4...
- baalimago 7y agoif err != nil { panic() } on virtually every single function call gets a bit tedious.
- badrequest 7y agoso don't do it?
- ngngngng 7y agoI'll still take that over having no idea what errors could be thrown at which point in my code. Treating errors as values is very verbose, but it's the easiest error handling I've ever tried to wrap my head around.
- marcus_holmes 7y agothis is literally how not to handle errors, so why are you doing it?
- djhworld 7y agoIt's really interesting to have seen a language launch, develop and evolve over the last 10 years. Back in 2009 I'd just started my career, and while I've been mostly doing Java development professionally, I do a lot of Go stuff in my side projects. Long may it continue!
- timothycrosley 7y agoAnd yet it still feels like a language out of the 60s or 70s. To me, Go feels like the programming language equivalent of insisting that everyone communicate just by grunting because it's less complex to teach people just grunting than it is to teach them more effective forms of communication. And in theory, they still can communicate all the same things with more grunting! Some people refer to this as simplicity, and in a way it is, but it's simplicity in the language constructs at the expense of more complexity in the usage of the language to form more complex thoughts. There must be a golden balance here, but I don't feel like Go is it for all the fanfare it has been getting lately.
- badrequest 7y agoAny specific complaints, or did you just feel like calling us all cavedwellers?
- timothycrosley 7y agoMost of my complaints, I feel like are pretty well documented: No ability to do Generics, no ability to do operator overloading, no ability to make your own for each style loop objects, very manual and repetitive error handling. These are all simplifications to the language spec at the expense of more complicated usage. For the most part, I've been trying to understand myself how to express why I get a pretty bad taste in my mouth when using or looking at Go code, why it feels so much less productive to me than the higher-level languages. Which is what it has been making dents in more than anything else. I especially wanted to understand this since I do see myself as someone who values simplicity. In the end, it's because I value simplicity in usage, rather than the simplicity be in the language constructs. I'd instead rather learn a slightly more complicated language, and be more productive with every task I write using it. I don't see Go users as cavemen. That was admittedly an exaggeration to express my point clearly.
- nemo1618 7y ago>In the end, it's because I value simplicity in usage, rather than the simplicity be in the language constructs. That's interesting, because to me, Go accomplishes this fairly well. Generics, operator overloading, and custom 'for' loops make it easier to write "clever" code with surprising behavior. Go's design is not elegant like Lisp or Haskell; there are some warts and special cases that exist for pragmatic reasons. But it manages to be simple and effective, which is sadly a rare thing in the modern language landscape, where the mentality seems to be "more features = better language." 90% of Go's value is in what it takes away, rather than what it adds.
- cyberpunk 7y agoIs modern go code still 50% "if err != nil" ? When I last used it the error handling drove me a bit mad. I get the reasoning, but the amount of identical error checking code for (almost) every single call didn't make me feel terribly happy compared to my easy life in the erlang/elixir 'let it crash' world :}
- badrequest 7y agoGo 1.13 introduced new error handling mechanisms: https://blog.golang.org/go1.13-errors https://blog.golang.org/go1.13-errors
- Insanity 7y agoTrue but this does not circumvent the error checking. That proposal got denied :)
- Insanity 7y agoYes, though it doesn't bother me. I also think that with the correct design you can eliminate a lot of those checks. (e.g, avoiding pointers that can cause nil / error returns)
- ainar-g 7y agoAll points are like stale mantras by now, but still: * Errors happen. All the time. And how you handle them matters. The err != nil path is not unlikely. * If your error processing code is repetitive, you're doing it wrong. Wrap your errors. Add context. * Errors are values. Make them useful. Again, add context. Honestly, while a lot of people look at Go code and think “this is 50% error checking”, every time I read an under-handed piece of C or under-catched piece of JavaScript, I think to myself “where is the error checking?”
- therealdrag0 7y agoIn Java I feel like most of the time it's fine to just Throw (or let throw) errors, and a parent can catch and log and move on with its life. Go feels like making _all_ exceptions checked, whereas I usually try to only use unchecked exceptions and it seems to work out fine :P
- Insanity 7y agoHappy birthday to Go :) I've been using it for a couple of years both professionally and on the OSS side of things and I'm absolutely loving it!
- nicodjimenez 7y agoGo is so good for web servers. Performs extremely well "out of the box", easy to learn, and easy to deploy due to static linking. Here's how I usually look at programming languages vs use cases in back end development: - Go for back end API's with high performance requirements - Typescript for IO bound API's that can easily be modified and understood by front end developers who use typescript for front end work - Python for scripting and IO bound API's
- preommr 7y agoI really like go, it's a wonderful language in many ways. But I really wish we got official answers on things like the code duplication. Either something like generics or code generics and just establish we're not going to get generics and put an end to the discussion.
- isof4ult 7y agoHave you seen Contracts? https://go.googlesource.com/proposal/+/master/design/go2draft-contracts.md https://go.googlesource.com/proposal/+/master/design/go2draf...
- marcus_holmes 7y agoGo saved me from EntityFramework. About 8 years ago, I was writing some app in C#, and the recognised way of doing things was EntityFramework. I duly wrote a bunch of code around EF, only to notice that sometimes it wasn't populating with the data correctly. Digging into the documentation, I found that EF didn't actually do lazy loading properly, and that if you really wanted to be sure that the data was populated, you should call a method to check that the property you wanted had been populated, and if not, call another method to populate it. I threw Windows in the bin after that. I uninstalled Windows, installed Linux, and started looking around for another language to code in. I found Go. It's total lack of magic, utter transparency and attitude of simplicity made complete sense to me. <10 years later I'm still happily coding in Go. Thanks guys, this is awesome!
- Scarbutt 7y agoHow does Go solves your EF issue? Or, what would you use to write that app today in Go?
- apta 7y agoSounds like throwing the baby out with the bathwater.
- marcus_holmes 7y agoToday I have to write the SQL, and pull the results of the query into a struct, which implements relevant interfaces. It's more code to write, but it's simple, and straightforward, and it does exactly what it says it does, and no more. It's easier to write and understand, and trust. Most of all, trust.
- 0xcoffee 7y agoEntity Framework is just an ORM. Every ORM has their quirks. It's unclear why you ditch a whole language, and even the OS just because you didn't enjoy using an ORM. If you want to write pure SQL and pull the results into a struct with interfaces, you could do that in C# also.
- kerng 7y ago10 years old and still very immature and a pain to work with... it's all so backwards and I am not sure how many unnecessary lines of error code handling I had to write. Its horrible to read, my takeaway, pick either Java for business problems or Rust if you wanna do native stuff. Python is also much better compared to Go. I feel like I became less skilled in coding the last year and a half... Switching jobs soon, moving to a go free world. :)
- dharmjit 7y agoI am recently introduced to golang. I really like the simplicity, expressiveness and standard library. I am also a fan that developer need not to deal with every nitty gritty details about the language, os etc.