11 ms·
As a mere average user of computer languages, every time I play around with Go I start wondering how a language like this became so popular. It feels like it w
by sfilargi 10y ago
As a mere average user of computer languages, every time I play around with Go I start wondering how a language like this became so popular.
It feels like it was invented in a universe where Haskell, OCaml, Erlang, Smalltalk, Lisp and so many more languages and research in languages never happened.
- zem 10y agoit was also invented in a universe where haskell, ocaml, erlang, smalltalk, lisp and so many more languages never achieved mainstream adoption. go will never be all things to all people, but it's clearly popular in the niche it's targeting.
- fossuser 10y agoSometimes I think the syntactical difference of functional languages alone is the reason they're unpopular. Iterative languages seem to match more closely how people speak/think in verbal language.
- moomin 10y agoIt's a pity it's hard to be precise in verbal communication without resorting to talking like a functional programming language.
- donatj 10y agoI agree completely. I recently went to an Elm workshop and while I found it very interesting, the Haskell syntax just didn't agree with me. I want more enforced required clarity. I compared it at the time to writing English without any punctuation, you can do it but it makes comprehension much more difficult.
- rnhmjoj 10y agoIt may match more with the way we speak but not really the way we think, imho. When you ask someone to do something you usually just give him a general description of what the end result would be and then add more details if necessary. You don't tell him exactly what to do step by step from the start to the end, because you don't really care most of the time. Markup and declarative style are closer to the way we think.
- ASinclair 10y ago> As a mere average user of computer languages, every time I play around with Go I start wondering how a language like this became so popular. You can pick it up in a weekend. A lower entry bar means more people will try it out. > It feels like it was invented in a universe where Haskell, OCaml, Erlang, Smalltalk, Lisp and so many more languages and research in languages never happened. It was developed in a large enterprise context not in an academic context. I think it shows.
- ue_ 10y agoTo be honest, you can probably also pick up Lisp in a weekend, experienced programmer or not. The syntax is also simpler.
- bluejekyll 10y agoBut all those parentheses! I know it sounds like a lame reason to dislike a language, but I've always found staring at Lisp to be so much more difficult and distracting than C-style syntax.
- bitwize 10y agoUse Emacs and take advantage of its electric indent.
- nickpsecurity 10y agoThere was an attempt to deal with that: https://en.wikipedia.org/wiki/Dylan_(programming_language) https://en.wikipedia.org/wiki/Dylan_(programming_language) Also, Julia was syntactic and/or semantic sugar on top of femtolisp. Got converted to it in first pass with LISP's power doing the rest. Here's Stefan Karpinski on that: "So ultimately the reasons for Femtolisp are: 1. Scheme is excellent for writing parsers since trees (aka S-expressions) are its forte. 2. Femtolisp is a small, simple, highly embeddable and remarkably fast Scheme. 3. We control it (and by "we" I mean Jeff) and can fix any bugs we encounter." Yep, No 1 are those godawful parentheses and s-expressions making the job easier. ;)
- 10y ago
- fjdlwlv 10y agoGo is a genersl purpose industry language. The ones you mention are niche or academic research languages.
- sfilargi 10y agoI just put some names randomly. You can add C++, Python, Ruby, and pretty much any other language after C.
- TheDong 10y agoThere are companies built on Haskell and Erlang. Just because a language is founded on good programming theory doesn't make it unviable in the industry. Ideally, the reverse would be true.
- IshKebab 10y agoErlang, sure. Maybe a few. But Haskell? I doubt there are many. I bet Go's use in industry is easily 100 times that of Haskell's already and it is much younger.
- pjmlp 10y agoGalois, Facebook and Microsoft are some examples, and all ML derived languages tend to be used for data modelling in the financial sector. https://wiki.haskell.org/Haskell_in_industry https://wiki.haskell.org/Haskell_in_industry https://ocaml.org/learn/companies.html https://ocaml.org/learn/companies.html
- akerro 10y agoWow, have you seen JavaSCript?
- sfilargi 10y agoYes, but I think know how JS became popular; syntax similar to Java/C++ and pretty much the only language available on the browser.
- bluejekyll 10y agoI'll agree with your last part, "pretty much the only language available on the browser."
- chrismealy 10y agoGo is designed for average programmers working in a huge organization. That's why its dullness is a virtue.
- TazeTSchnitzel 10y agoSo, Java?
- pjmlp 10y agoNo, Java has become too advanced for the typical Go developer. Too many features.
- geodel 10y agoIt is for me. Could not figure out advanced tools like Maven or gradle. Maybe it was beneath Java experts at Sun/Oracle develop simple cli tool that could compile a java project with one command.
- Filligree 10y ago'gradle build' Unless the project is very badly configured, that should be all you need to compile it. Now, writing those .gradle files...
- geodel 10y agoYea, advanced language like Java should have advanced build tools and build files. Go is simplistic so `go build|install|run` just works without IDEs, build files, and external build tools.
- danieldk 10y agoWell, yes, if you include the build tool in with your language implementation you do not need external build tools. Compiling most Java projects is usually as simple as 'brew install maven; mvn package'. Maven does require a build file, but it can also do more than the go utility, such as deploying artifacts in a repository, build distributable tarballs, RPMs, debs, etc. Maven, like go, largely relies on convention over configuration as well. If you generate a POM file from the standard archetype, you basically drop your files in the right source directory and it will build. (I am not a fan of Java, but I think a lot of the criticism here is lazy. The first time you use the 'go' tool you have to learn its usage as well: how to separate library code from programs, what are the conventions for package structure, how to avoid API breakage for downstream users, etc.)
- nickpsecurity 10y agoIt was intended to be a simple language. Each of the three authors had to agree on every feature (lowest, common denominator). One made C, one worked on Java, and one did an innovative language for Plan 9. Two of those languages ignored as much of the kind of work you described as possible. Something like Go is a natural result in terms of feature choices for the language itself.
- d0vs 10y agoIf you're used to dynamic languages, it gives you type safety and performance for little effort. I love Python but always wished for a simple, type-safe language; Go gives me that. It's not worse than Python IMHO.
- pjmlp 10y agoWithout support for meta-classes, annotations, generators, iterators and list comprehensions it surely is worse.
- abecedarius 10y agoGoroutines and channels can substitute for generators and iterators, with maybe a downside of being too much more expressive.
- SamWhited 10y agoUnless you're one of the people (like me) who considers its lack of many of those things a feature. More features doesn't necessarily make something "better" and less features doesn't necessarily make it "worse" (whatever your definition of "better" or "worse").
- pjmlp 10y agoNo I am not, I am no longer programming in the mid-90's and even on those days, Turbo Pascal had more features than Go. I only advocate Go as a replacement for those that would use C for user space applications, or possibly some kind of low level stuff. If Python and Ruby eco-systems had blessed compilers, instead of just CPython and MRI, I doubt people would be flocking to Go. We already see this happening in the Ruby world, just let Crystal become a bit more mature.
- solidsnack9000 10y agoColleagues I've spoken with who use both still say, that Python is "20 times" as productive as Go. For some applications this multiplier likely goes down considerably; but Python holds an edge in a lot of areas.
- JepZ 10y agoWhen you talk about Go I think you should start with C. One of my professors used to tell us, that C was built by people who wanted to use it and didn't care about academic style. In many ways Go is just the next step of C. C did not have object orientation and even passing functions around was kinda hard. While C++ tried to bring object orientation to C (total failure) Go decided to keep the core values of C and instead improved the rough features (e.g. easier binding of functions to structures, faster build times). By making it easier to pass around functions Go enables functional programming styles, but at its core, it is still just an improved C. The only revolution within Go (as a language) is the concurrency and channel concept and I think that was taken from some functional language (not sure). I really like Go, because it just feels right. It might not be as clean as Smalltalk or Lisp, but it has data structures and functions, teaches you how important interfaces are and lets you build highly concurrent applications with ease. In addition, it brings a nice set of tools which integrate well into a shell driven workflow. After all, the whole thing should not surprise anybody as Ken Thompson[1] was part of the Team which invented Go. [1] https://en.wikipedia.org/wiki/Ken_Thompson https://en.wikipedia.org/wiki/Ken_Thompson
- kem 10y agoI wish people understood this better. I'm not a Go programmer, but I have a lot of respect for it. If you're wondering "why Go"? Think of it as a modern version of C, at a slightly higher level, developed by the same people for slightly higher-level tasks. They made C for low-level stuff, and then picked up with Go for higher-level stuff. It's like C+. C has been very successful in part because it's so simple in certain respects (although not in others) and I think Go will be successful for many of the same reasons. Go does what it does very well. I think Rust is actually a great choice for something like Tor, but I wouldn't use Rust for some of the things I'd use Go for.
- astrostl 10y ago> It's like C+ That's perfect.
- pcwalton 10y agoGo doesn't have faster build times than C. Rather, it has a de facto single implementation that's fast because it doesn't do the same level of optimization that modern C compilers do. The one improvement over C related to build time in Go is that you don't need include files. Granted, that's a big one. But modern C compilers make header parsing extremely fast.
- giancarlostoro 10y agoThe success for Go was in the out of the box libraries, and by this I mean you didn't have to "pip install" , "npm install", "nuget install" - no idea what the command is for nuget, always used the GUI, but you get the idea... For example when I was trying to learn Go for the first time I saw how easy it is to dive into Web Development. I can just import a package that came with Go itself, and I would be good. I think also the way it pulls in packages is part of it's success as well. It's not a traditional package manager (yet) but it worked. You put in a repository from the web and it pulls it, it made sharing and reusing code really easy. I never had issues just running Go code either if it was a codebase that was full of mostly Go code. Btw I don't consider myself a Go developer, at work I use C# and Python. I would love to learn Rust, used to be the other way around, but I've lost hope in Go and have taken a second look at Rust, I love the direction Rust is going overall, but I understand why Go got so popular so quickly, it came at the right time with the right amount of working parts.
- ilovecaching 10y agoDon't frame the question as language X vs language Y. Think about the ecosystems instead. Golang provides a batteries included API that allows developers to rely less on third party libraries with shaky SLAs, a promise of version stability, and great tooling that has increased consistency of coding styles across projects. It's a simple language with a a low barrier to entry, and the Google brand encouraged earlier adopters to take risks and build products that luckily became very popular (Docker, Kubernetes, etc). It looks a lot like the languages that are already popular in Industry, without providing any real groundbreaking concepts. Building software is an economic value proposition, and it turns out that there are many ways in which a language's ecosystem can provide good value for the investment beyond the pros/cons of the language itself, and often these advantages are easier to measure from a managerial standpoint.
- loup-vaillant 10y agoFrom the perspective of a user, you make some sense. From the perspective of a language designer however, great ecosystems are no excuse for crappy languages. The Go language doesn't have to be crappy to provide batteries included API, version stability, and great tooling. No generics and no sum types? Those are no longer groundbreaking, they're the bare minimum. Old languages like C at least had the excuse of being created a long time ago, when we possibly didn't know better (and computers were much slower). Go's creators however don't have that excuse. They screwed up, plain and simple.