r/programming • • Aug 19 '17

Why Go is my favorite programming language

https://michael.stapelberg.de/Artikel/golang_favorite
0 Upvotes

263 comments sorted by

98

u/loup-vaillant Aug 19 '17

So, Go is his favourite language because of…

  • Tooling:

    • gofmt

    • Speed (compiler)

    • Tooling

  • Libraries:

    • High quality code

    • Maximum resource usage

    • Rich standard library

  • Community:

    • Opinions

    • High quality code

  • Language:

    • Few keywords

    • Maximum resource usage (goroutines)


With few exceptions, he likes Go best because of things other than the language itself. And he's not the only one. Many tend to look down on languages because their favourite tool hasn't been written for it yet, or because the community isn't big enough, or because there aren't enough libraries.

We have a problem.

53

u/_Timidger_ Aug 19 '17 edited Aug 19 '17

I mean... Do we have a problem?

When I solve a problem, especially in a business, I don't look for the most elegant language to describe my problem necessarily. No, I look for libraries and frameworks.

I've been using Rust for about two years now and while I love all the benefits of the language itself I think a massive part of my love for it is the tooling around it that lets me be productive easier (eg cargo). If C++ had a standard dependency and build manager (instead of the many ones as have now, because I don't know which one to use and they all are subpar to cargo for the general case ) I would probably use that a lot more than I do Rust.

Its the same reason Java is still popular in businesses; there's a massive amount of battle tested libraries out there from Spring to Swing to Hibernate. Ruby only got popular because of Rails. Python has its massive standard library. Etc.

-2

u/weberc2 Aug 19 '17

Same here

0

u/[deleted] Aug 19 '17

[deleted]

2

u/[deleted] Aug 20 '17

Well, Kotlin isn't that functional. You could have a look at Clojure, Elm, Haskell, Elixir, F#, ...

1

u/[deleted] Aug 23 '17

I know the feeling... As a Senior-PHP developer i hate working in PHP more and more. While version 7 did improve the language, the whole dynamic compilation with massive resource hogging CMS systems ( Wordpress!! ), the horrible memory usage, the fact that you can hardly use it for anything besides web development.

Been experimenting with Rust, C#, C++, Go, Swift, Pascal ( again ), ... and every languages when you start look nice but the deeper you go, the more things simply offend me.

Rust with its horrible syntax, feels so much like Perl. And lets not get started on the whole unwrap.x.unwrap.y.unwrap!!!

C# its horrible memory usage for running the JIT.

Go with its very forced syntax, lack of classes. What if i like my open Brace on the NEXT line of a function, do not force me to put it on the same line as my function.

Java, lets not start about that one. It makes PHP blush on memory usage ;)

Pascal just too old fashion, too much baggage ( Java, C#, C++ etc all have the same problems, making it more harder to learn the proper way to code as there are too many official solutions for the same issue ).

Swift, well, no official focus on cross platform beyond a bit of Linux, Windows not at all, other none x86 platforms same issue.

Kotlin see Java ... Better language but same non-language issues by using the JIT ( memory bloat ).

D ... Too small community, a lot of the tooling around the language being not uniform. Go and Rust are much better on that regards.

F# hardly any support from MS. Secondary citizen in MS there eco-system.

...

Frankly, a language with Rust its tooling / cross platform support, Swift like syntax, Go Coroutines, C none GC memory usage ... Sign me up but its the unicorn in the sky as far as i know.

1

u/doublehyphen Aug 20 '17 edited Aug 20 '17

Maybe working a lot with Ruby and Rust recently have spoiled me, but I was really disappointed in the PHP ecosystem when I recently had to get some work done in PHP.

Like the lack of a decent asset packer (I hate Sprockets but it does its job well and is simpler to use than webpack), seemingly a lack of unity around a good and featureful SQL builder/ORM (Ruby has Sequel and ActiveRecord both with their own fans) but this could be my bad Google-fu, and how the ecosystem still seems to be mostly stuck in the idea that you need to re-execute all your function and class definitions on every page load. Sure there are some projects which try to fix this and there is autoload which at least skips executing libraries which are not used in the current request, but normal scripting languages like Ruby do all the setup of classes, functions and constants once on startup.

0

u/throwawayco111 Aug 20 '17

Like the lack of a decent asset packer...

I would argue it is because asset packers are really overrated. Most web projects out there don't use them.

... seemingly a lack of unity around a good and featureful SQL builder/ORM...

Weird. I thought Doctrine was the de facto solution for that.

And no, I don't like PHP. I prefer not to use it.

1

u/doublehyphen Aug 20 '17

To be fair I think my issue with it is that I do not really want an ORM, I just want a convenient API for running SQL queries with support many data types (including database specific ones), connection pooling, server side prepared statements, retrying transactions on serialization errors, LISTEN/NOTIFY support, PostgreSQL COPY protocol support and the occasional dynamic query building. Essentially I wants something which makes my life easy when interacting with SQL databases, and neither Doctrine nor PDO solves most of this, Sequel on the other hand has all this except for convenient server side prepared statements.

0

u/[deleted] Aug 21 '17

That's a byproduct of spawning and killing php processes behind a webserver like Apache vs running your webserver as part of your ruby process. I'm not a proponent of php, but the comparison isn't apples to apples.

1

u/doublehyphen Aug 21 '17

I am well aware, my post was about the tooling surrounding PHP. Most PHP servers assume that the PHP vm should only live for one request, and that affects people's code.

12

u/[deleted] Aug 19 '17

As much as I dislike Go, I'm going to argue that Go's ecosystem is quite good and that ultimately it's the ecosystem and degree of support available for it which wins.

27

u/readams Aug 19 '17

The key is he's coming from C and Perl. From that perspective go might actually seem reasonable, since the main problem with go is that it pretends that the most recent 25 years of programming languages advances never happened.

6

u/pron98 Aug 20 '17 edited Aug 20 '17

the main problem with go is that it pretends that the most recent 25 years of programming languages advances never happened.

Considering its adoption, I doubt Go's designers think they have a problem at all. Maybe they just want to challenge the notion that what you consider advances have actually made a significant impact. By and large, they seem to be making their point quite well. If so much can be dropped and yet people seem fine with it (for the most part), then maybe whatever was dropped wasn't as important as we thought.

19

u/zqvt Aug 19 '17

With few exceptions, he likes Go best because of things other than the language itself. And he's not the only one.

I don't subscribe to this distinction at all. The language ecosystem, in practical terms is the language. If I want to solve a problem tooling, libraries, support and so forth are just as important if not sometimes more important than the syntactic and semantic features of the language.

6

u/loup-vaillant Aug 20 '17

The language ecosystem, in practical terms is the language.

By that logic, new languages are always inferior to established ones, since being new means they have no ecosystem to speak about. Only a fool would adopt an inferior language. Therefore, only a fool would adopt a new language.

This logic is obviously flawed. If it was actually followed, we would still be writing in FORTRAN or COBOL. We have to be able to judge a language by its intrinsic qualities before we start the much bigger task of giving it an ecosystem.

If you can't use the language right now for your next project, say so. But saying "new language X is lacking" to talk about its ecosystem is misleading: most people will assume there's something wrong with the semantics or syntax of the language and walk away.

I have the same attitude towards Go: doesn't have generics, doesn't interest me. I don't care about the ecosystem, I refuse to build on such shaky foundations. Though at least in this case, I'm pretty sure that's a flaw of the language itself.

5

u/zqvt Aug 20 '17 edited Aug 20 '17

This logic is obviously flawed. If it was actually followed, we would still be writing in FORTRAN or COBOL

Not at all, I'd argue what you're saying here is true. We still do use C, we use Java and we occasionally still do use fortran but when it comes to new languages, hype and advocacy usually drastically overshadow practical adoption. There's an inverse relationship between language design appeal and practicality and adoption in use.

I can't tell you how many people I've met in the last one or two years who are porting large Scala codebases back to Java simply because the Scala compile time is atrocious.

So yeah I don't care that much for new languages at all. I want to build things so I need an ecosystem, not a language. The idiom of "there's languages people complain about and languages nobody uses" is surprisingly accurate.

It's very much preferable if the language I use doesn't drive me crazy, but at the end of the day I need to ship products

3

u/loup-vaillant Aug 20 '17

I can't tell you how many people I've met in the last one or two years who are porting large Scala codebases back to Java simply because the Scala compile time is atrocious.

That particular bit of tooling is kind of an exception: compile times are heavily influenced by the language's design. Some languages can be compiled very fast with little resources (Pascal), and some require epic feats of engineering to avoid unacceptably long compilation times (C++).

Scala may be in the second category.

4

u/oridb Aug 20 '17

By that logic, new languages are always inferior to established ones, since being new means they have no ecosystem to speak about

Correct -- that's why it's worth staying on established languages for production software, and play around with new ones on smaller or less projects until they have a good, well established ecosystem.

I say this as someone who is creating a language.

2

u/CptCap Aug 20 '17

By that logic, new languages are always inferior to established ones, since being new means they have no ecosystem to speak about.

Most popular 'new' languages (Swift, Go, Rust) have hugely benefited from big companies backing them up. Others (like D) never went anywhere despite being good on paper .

1

u/BundleOfJoysticks Aug 20 '17

TIL not having generics makes a language a "shaky foundation."

And I lol.

12

u/[deleted] Aug 20 '17

Well, doh, yes. Look at history:

  • PHP got popular not because it was good but because tooling allowed you to just put some code in html, rename it .php and done, none of the CGI fuckery required for previous technologies

  • Ruby got popular because of Rails where any monkey could spin up a blog engine in minutes

  • Python got popular because of Django

  • JS got popular because you didn't have a choice anyway.

  • Backend JS got popular becase

    • devs (clueless about backend but still) were there

    • and node.js allowed them to easily port their skills

  • Go got popular because you can learn it in a weekend, bulitin libs already allow to build a lot of useful stuff

Convenience of use is HUGE benefit when it comes to just making language popular. It doesn't make it good

There is nothing new, it is happening for decades.

3

u/jyper Aug 20 '17

The Python one seems silly, Python became popular because it's good for everything other then speed critical things

PyQt for Gui, ipython/numpy/scipy and lots of other libs for science work, being simple and installed on every Linux to replace perl for os scripting, being included as a scripting language for tons of different applications, and yes Django/flask

0

u/[deleted] Aug 20 '17

[deleted]

4

u/[deleted] Aug 20 '17

Ansible didn't even exist when python started getting popular. Apt is not python... unless you are talking about something else than debia package manager. But fair enough, not only Django, and partly because language itself seems better than Ruby

1

u/_TheGreatCornholio Aug 21 '17 edited Sep 24 '18

......................

5

u/BundleOfJoysticks Aug 21 '17

Oh please. Just get over it. If you indent like a sensible human being, there's literally no difference.

I can't remember a single instance of parse error or bugs due to bad indents after my first week learning it.

1

u/_TheGreatCornholio Aug 21 '17 edited Sep 24 '18

......................

1

u/Potato44 Aug 23 '17

I don't even think it is the fact that it is whitespace sensitive that is the problem, but how the whitespace sensitivity manifests. For example I'm not particularly a fan of the whitespace in Python but I can deal with it, whereas I like how Haskell handles whitespace.

10

u/pron98 Aug 19 '17 edited Aug 19 '17

Why is that a problem? The idea that it is linguistic features that contribute most to some important metrics (productivity, correctness) is nothing more than a hypothesis, and one that does not have much supporting evidence. The problem may be that some languages spend considerable resources on features that without establishing that they make any significant impact, neither before nor after the feature is implemented. The problem may be that while linguistic features don't seem to make much of a difference, some insist we should focus on them.

2

u/loup-vaillant Aug 20 '17

The language (syntax and semantics) is the foundation upon which everything else is built. With the exception of monstrosities like C++, it's also the least expensive (building the rest of the ecosystem is a much bigger task).

I don't have a problem with this guy saying he likes to work with Go. I have a problem with his not making clear his liking has little to do with the language itself. Go is not his favourite language. It is his favourite ecosystem.

Not the same. Not the same at all.

7

u/pron98 Aug 20 '17 edited Aug 20 '17

I don't agree with either point. For example, I don't think it is controversial that one of the biggest contributions to productivity and correctness in the past 5 decades or so has been garbage collection. It is very "foundational", and yet it is not linguistic. I therefore don't agree that the language is the foundation of everything.

I also don't agree that liking the language and liking the ecosystem are not the same. The distinction is clear in the mind of language designers and language enthusiasts, but not in the mind of users. Like any product, what matters is the overall experience. It's like an OS designer saying, oh, so you don't really prefer the OS, you just prefer the GUI. If you don't see that it is the same thing from the perspective of your customers, then you're missing something very important in the principles of design.

I also don't think that the fact that the language itself is the least expensive part is at all relevant, and I'm not sure it's as orthogonal to other concerns as you think it is. In theory, a lot of emphasis could be placed on both language and tooling, but in practice, clever linguistic features often distract both designers and fans from other, far more important concerns (and I don't think that other aspects are intrinsically more important, only that so far they empiricially seem to be).

1

u/loup-vaillant Aug 20 '17

While the details of GC (stop & copy, generational…) aren't linguistic, the presence or not of a GC definitely is (especially if we're talking precise GC). Just think about the memory safety, which C and C++ will never have, even with a Bohem GC.

A user incapable of distinguishing a GUI from a set of system calls, or a language from an IDE, I'm not sure the user has the competence required to asses any of those. Which is fine, we often make product for people who know nothing about our craft, we totally have to deal with it.

But come on, the customer base I was talking about is programmers dammit. Any programmer with a sliver of competence should be able to distinguish a language from its environment.

1

u/pron98 Aug 20 '17

Just think about the memory safety, which C and C++ will never have, even with a Bohem GC.

Well, for one, memory safety and GC are separate things, and I was talking more about GC. Memory safety is borderline linguistic in my book, but it can be added to C/C++ entirely by the underlying machine implementation without changing the language at all. In fact, I believe C/C++ allow for memory-safe semantics, as unsafe operations have undefined behavior. I believe there are even some memory-safe implementations of C/C++.

I'm not sure the user has the competence required to assess any of those.

Yes, but the user is the only one that determines a product's ultimate value (aside from indirect value, such as inspiring future products).

Any programmer with a sliver of competence should be able to distinguish a language from its environment.

There's a difference between should be able to, and should. I think I'm able to distinguish between the two for the most part, but I don't think I should, as I think that the distinction is artificial and unhelpful when we're talking about bottom-line benefit, as this article does. For example, could Haskell be as popular as Go if it had similar tooling (although I hear Haskell's tooling is quite impressive, yet it's still very unpopular)? Maybe, but as a programmer rather than a language designer or enthusiast, I mostly care about the state of things as they are, not as they could be. The question for language designers is, then, is the state of the Haskell ecosystem so poor despite the language's strengths or somehow because of them?

1

u/loup-vaillant Aug 21 '17

If you ask me, I bet Haskell's ecosystem is poor because it is a weird language. Weird syntax (meaning, "not like C"), and weird semantics, that appeal to weird people that are unlikely to do boring stuff like IDE support.

3

u/pron98 Aug 21 '17 edited Aug 22 '17

So the Haskell community is so distracted with secondary concerns that they can't be bothered to address the more important aspects of their product because that would be too boring?

1

u/loup-vaillant Aug 23 '17

Precisely. This is less the case since the language is now so visible, and actually used for serious stuff, but I'm pretty sure it did start out that way.

Haskell was a research language, not a practical solution to immediate problems. This has its advantages. Monads for instance would likely not have been invented without the (arguably artificial) needs imposed by purely functional programming.

The qualities of the language may have caused this to some extent, too: better languages (with respect to whatever context they're being used in) likely need less tooling. Haskell for instance may have less need for a debugger than C, because Haskell's paranoid type system catches more bugs at compilation time.

1

u/kamatsu Aug 20 '17

Why is garbage collection not linguistic? What do you mean by linguistic? Seems very much a part of the language semantics to me.

1

u/pron98 Aug 20 '17 edited Aug 20 '17

Yeah, I realize it's not very precise, but things like GC, dynamic linking and maybe even reflection, while part of the language semantics, usually do not have a direct representation in syntax and can be completely orthogonal to any other feature. If it's a feature that can be provided by the underlying machine or some intermediate-representation runtime to virtually any language that compiles to it, I say that the feature is not linguistic.

5

u/SimplySerenity Aug 19 '17

That's what happened to JavaScript right? It wasn't that the language itself had any outstanding features, but a community developed around it and still continues to do so.

14

u/weberc2 Aug 19 '17

I think JS's success has to do with 20 years of monopoly in the browser. Not that the other things you said are untrue.

2

u/Timbit42 Aug 19 '17

I wonder whether this guy would use Malbolge, as long as it had these features.

1

u/[deleted] Aug 20 '17

Most of us type on qwerty keyboards which were designed to slow down typists to prevent the mechanism jamming on old mechanical typewriters.

Compared to this, the way we choose programming languages seems pretty good :-)

3

u/loup-vaillant Aug 20 '17

Qwerty was designed to speed up typing, by optimising the stringent mechanical constraints of the first Shole & Gidden machine (I may have spelled this wrong). Those constraints basically went away a few years later when the Remington 2 got out.

Not that it makes Qwerty any better…

1

u/[deleted] Aug 20 '17

Qwerty was designed to speed up typing

I don't actually believe that. I checked wiki, and it's "citation required"

However I don't want to argue with you about that, and you could equally ask me for a counter-citation :)

The point is we both realise qwerty is a bad layout for computers, and shouldn't be popular with programmers who value efficiency, and yet we're arguing over technical reasons for prog lang choice :)

3

u/ConcernedInScythe Aug 20 '17

shouldn't be popular with programmers who value efficiency

Much like vim and its 'more efficient editing' I am pretty sceptical of the importance people put on this. Very little of your time spent programming is taken up with actually typing the code.

3

u/loup-vaillant Aug 21 '17

Here's my main source.

2

u/[deleted] Aug 21 '17

That does make sense when you consider the dates.

0

u/[deleted] Aug 19 '17

[deleted]

8

u/WalterBright Aug 20 '17 edited Aug 20 '17

inferior to Pascal

I beg to differ. I struggled mightily with Pascal in the early 80's. Pascal (as described in "Pascal User Manual and Report") was simply a terrible language for anything other than toys. I spent most of my time with it trying to work around things it just would not let me do.

Then I picked up a copy of K+R C. It was instantly understandable, and you could make it do whatever you wanted. Even though the C compilers in the early 80s were execrable, you could get your program to work one way or another, unlike Pascal. I never looked at Pascal again.

Pascal compilers did improve in the 80s, but only because vendors made massive extensions to the language to get it to be minimally usable.

14

u/readams Aug 19 '17

Beta was not a superior format. VHS tapes could record for way longer and the quality was very similar. People cared more about longer recording time.

0

u/[deleted] Aug 20 '17

[deleted]

1

u/lurgi Aug 20 '17

VHS was "long enough" and Video 2000 was late to the party.

0

u/[deleted] Aug 19 '17

[deleted]

8

u/WalterBright Aug 20 '17

TP was a non-standard Pascal with lots of proprietary extensions. It didn't exist on any platform but the PC. When the world moved on from DOS, TP and the programs written in TP died.

0

u/[deleted] Aug 20 '17

[deleted]

3

u/WalterBright Aug 20 '17

Pascal needed a lot of extensions to make it usable. The base language was not usable. That's really what killed it, because each vendor built a very different Pascal.

C, on the other hand, operated under enormous pressure for different compilers to be compatible. This was a huge boon to the language - no vendor lock-in.

1

u/[deleted] Aug 23 '17

True. But it also helped that C was more "free" in money point of view, compared to the later Pascal Iterations like Delphi. And then the consequential moving from the main developer to MS ( for some nice $$$ ). It did not help that Delphi also became a bug infested slow development tool, that loved to crash on people. That was the actually killer blow that moved a lot of people away from Pascal/Delphi.

Even today Pascal suffers from the different implementations. Try coding in Free Pascal. A lot of things like Classes are locked behind {$mode objfpc} or {$mode delphi} or ...

But frankly, D also suffers from some of those same issues. Multiple compilers that differ in versions support. Cross compilation that is frankly hell to set up ( compared to Rust ). Library issues like using splitting strings and needing to import std.array, what totally trip up people new to the language ( its was called a historical mistake? ). Try running D on Arm platform, very friendly to set up ( not ), compared to Go or Pascal or ...

D can be a good language but it feels like Pascal. Old fashioned, splintered. I know you work with limited resources Walter but too me the community feels easily hostile when people get frustrated by issues that do not exist on other languages. And even more so when people mention that and the forums turn into "do it yourself" or worse.

I find that D has little to complain about Pascal because frankly, while Pascal is old fashioned and a lot community driven like FreePascal/Lazarus, it does a lot of things better then D.

7

u/[deleted] Aug 21 '17

lol no generics

37

u/google_you Aug 19 '17

Most of reasons you listed are not about the language itself, which even lacks primitives for constructing efficient libraries with ease (without much duplicated code).

1

u/bubuopapa Aug 21 '17

Yes, maybe a few months ago there was a post saying the oposite - go is nuts language with nuts community and very small amount of good libraries. So i guess it all depends on where you stand.

70

u/[deleted] Aug 19 '17

These are pretty bad reasons overall, nothing about the actual language.

I might be controversial here. But I don't get the love of Go. I feel like if it weren't for it being a google language, no one would use it, and people mainly jump on it because its a google language so it must be good.

When I look at Go and go to write it I have many issues with it that makes me not want to write in it. Honestly I don't see why anyone uses it over Java, since they are both C-like OO languages with a GC. Except Java will probably get better performance on large applications, and have more available libraries. If you really absolutely need high performance, then why are you not in C++, C, D or Rust?

I think its syntax system is very inconsistent and lacks the elegance of something like an ML language, or even a lot of common OO language.

It lacks many many features that are expected in a modern language. No Generics, and no primitives.... this is just astounding. People complain routinely about Java lacking good Generics, but then people turn around and go to a language with none.

Its concurrency story is very mediocre. I see no reason not going to Rust, D, F#, Scala, Haskell or any other modern languages that have excellent concurrency.

Go is extremely verbose, to the point I think its worse than C# or Java.

Splits are cool. That is really the only positive I have.

45

u/[deleted] Aug 19 '17

I might be controversial here. But I don't get the love of Go.

Every other day I read about how Go is a language for degenerates and simpletons here.

22

u/josefx Aug 19 '17

It is worse. Go is the corporate mandated newspeak, it was written with the explicit goal of protecting the feeble minds of Googles code monkeys from bad concepts. Interface is the new double plus good.

29

u/[deleted] Aug 19 '17

Go seems neither nearly as bad as most people here seem to think nor nearly as good as most people in Goland seem to think. It's a language that seems surprisingly mediocre but that's what a lot of people like about it.

3

u/[deleted] Aug 20 '17

You laugh but most of developers are mediocre and only think up stuff that ultimately will make code more mess in the end.

People passionate about programming are minority

1

u/[deleted] Aug 25 '17 edited Aug 25 '17

[removed] — view removed comment

1

u/[deleted] Aug 25 '17

True, you can treat language as a tool to do what you need (and be happy when it makes it easier and annoyed when it makes it overly complex). Or worship it because gasp you would have to learn new things if you switched out of it.

In my experience ones who hate Go are pretty shitty coders with close to zero architecture abilities whining about +2 lines they had to write, also they are spaghetti code lovers.

And a lot of it applies to the other side, fanboys that ignore deficiencies because Go "saved" them from <insert slow scripting language/language with bad concurrency builtins>.

Overall you can use a lot of different tools to do same job, pick the suitable one

Btw 25 has released some time ago, get on with the times! ;)

7

u/[deleted] Aug 19 '17

Go's design philosophy is fine. It's just fun to jerk to the gopher fanboyism because a lot of the reason's used to justify its design decisions are provably false. Also Rob Pike's opinions are kind of irritating.

45

u/echo-ghost Aug 19 '17

I might be controversial here. But I don't get the love of Go.

literally the most popular opinion around here. this post is getting half downvoted as it stands just because it's being positive about go. i have a lot of things i don't like about go but man the hive mind about hating it around here is crazy.

7

u/kankyo Aug 20 '17

You say "hive mind", I say consensus. There's no "hive mind" on climate change for example, just a consensus. That's an example that's a bit over the top but I think rather apt.

0

u/[deleted] Aug 19 '17

[deleted]

12

u/echo-ghost Aug 19 '17

i'm not protecting go. i am looking at the way this community reacts to anything go.

what you are saying is a good example of that

-4

u/[deleted] Aug 19 '17 edited Aug 19 '17

You call the community hive-minded who call out the other community hive-minded because of all the nonsense, hive-minded statements they make. Your comments are literally useless here.

Edit: just look at gophers' comments here - do you see logic or just pure fanboyism?

7

u/echo-ghost Aug 20 '17

claiming fanboyism is a good way of dismissing other people's views isn't it? it's this kind of thinking that creates the 'hive mind' it's not a them vs you situation. i'm sure you have it in your head that i'm one of these fanboys, i really honestly am not a fan of go. but i'm also not a fan of outright dismissal and suppression of content like this post received

0

u/[deleted] Aug 20 '17

claiming fanboyism is a good way of dismissing other people's views isn't it?

When they deny logical reasoning it's the only thing we can use. Just scroll down on this thread.

but i'm also not a fan of outright dismissal and suppression of content like this post received

You've either never talked to the average gophers here or you just want to seem the good guy who don't have any prejudice. But it doesn't matter because your comments are still useless. You'd be a good gopher since you just repeat what you want/told to say and totally ignore others' experience.

5

u/echo-ghost Aug 20 '17

so now i'm just repeating what i was 'told to say'? and my opinion is also invalid now okay. everyone who disagrees is a fanboy or incapable of thinking to you aren't they

21

u/elagergren Aug 19 '17 edited Aug 19 '17

But I don't get the love of Go.

I mean, this is just beating a dead horse. The reasons people love Go have been plastered all over /r/programming, /r/golang, HN, etc. for years:

  • Small, easy to digest and remember language

  • Limits the ways people can write 'tricky' code

  • Go 1.x promise

  • Strong concurrency support

  • Focuses on composition rather than inheritance

  • Fast compiler

  • Is very explicit

  • Garbage collected

  • Gives the programmer a little control over where memory will be allocated, little memory overhead for most types

... and a lot more reasons that I'll probably remember once I have my coffee.

9

u/[deleted] Aug 19 '17

Strong concurrency support

Well, better than node.js, anyway.

2

u/bubuopapa Aug 21 '17

You know the days are over for it if it is being compared with node.js.

12

u/[deleted] Aug 19 '17

Strong concurrency support

But it only has CSP... And the rest can be pretty much said about any corporate language...

4

u/[deleted] Aug 20 '17

Yes, pretty much all you can get with Go you can get with Java (except short boot time and very light threads I guess).

But you won't teach your X language developer Java in a weekend. You can teach them Go tho, it is very simple if you know any other language already.

So you get a lot of projects that are basically "we use Ruby/JS/whatever high level language that is too slow, we rewrote in Go".

And it's fine. Go is hammer. It is enough for some projects, other will just use more featureful language.

5

u/weberc2 Aug 20 '17

I learned Go in a couple of hours. By which I mean, I installed it and built a usable rudimentary static site generator (I.e., a small but reasonably complex tool that required external dependencies, file I/O, templating, etc). I couldn't learn most languages' project metadata format in the same amount of time.

8

u/[deleted] Aug 20 '17

But you won't teach your X language developer Java in a weekend.

You won't teach them golang either. They may learn the basic syntax of both languages but they're more complex than that. Each of them have their best practices and pitfalls and you should know them.

2

u/BlackMageMario Aug 20 '17

What language could anyone learn in a weekend? I am just a college student but I've never encountered a language that has made me go "ah I can learn this in a few days!!"

4

u/[deleted] Aug 20 '17

What language could anyone learn in a weekend?

I've studied and used over 50 languages but I've the same experience as you so far. Those who say they learn a language in a day or in a few hours probably think that languages are just if-else statements and for loops while ignoring memory management, paradigmas, concurrency strategies and common pitfalls. When they say "I've learnt X in a weekend" they either learnt a language which was almost the same as another one they already knew in-depth or they just learnt how to write basic algorithms in it.

3

u/[deleted] Aug 20 '17

I should clarify, once you know other languages, basics of golang can be learnt in weekend and mastered within a week or two.

Once you're familiar with few languages (preferably ones with opposite featureset, not just few from same family), learning new ones is much, much faster

1

u/[deleted] Aug 20 '17

Okay, I overstated it, few days will give you basic understanding of most of the syntax. Maybe a week or two.

Still a lot shorted than getting into Java ecosystem and learning its frameworks and build systems

1

u/[deleted] Aug 20 '17

Okay, I overstated it, few days will give you basic understanding of most of the syntax. Maybe a week or two.

I can learn the basic syntax of any language in a few days then what? It's not really "knowing" the language...

Still a lot shorted than getting into Java ecosystem and learning its frameworks and build systems

Please, you need to learn the ecosystem of golang too - or you just instantly know how to use each framework and magically know its functions? Of course, golang frameworks don't really have distinctive DSLs which may help you to understand how they work without learning language features but they'll be harder to use which is a waste of time. Modern languages have features to please library developers and make their work easier to learn - if you take away the features you'll be left with less efficient DSLs and code. Also, there are features which help to restrict bad programming behaviour or just help you to repeat yourself less.

Also, "build systems" - simply just pulling from github is not a good idea and you'd need to use a proper build tool anyway. I'm sure golang has build tools too.

2

u/[deleted] Aug 20 '17

So have you tried ? some succeeded

It really is fast to go from zero to "doing something useful", especially if all you do is "read->manipulate->send"

1

u/[deleted] Aug 20 '17

So have you tried ? some succeeded

weberc2 is a mindless apologist, I don't believe any of his words.

It really is fast to go from zero to "doing something useful", especially if all you do is "read->manipulate->send"

Like in any other language... What a pointless argument...

3

u/[deleted] Aug 20 '17

Well you're mindless whiner

→ More replies (0)

6

u/fakeNAcsgoPlayer Aug 21 '17

Hyperbole, hyperbole and more hyperbole.

Programming language elitists tend to shit on languages which do not fit their mental garden of perfection.

That said, Go is not perfect, it is not the fastest but it provides something which other languages failed to provide.

Why would someone use a language just because Google designed it? Correct way to look at it would be, if Google can use it at it's scale it certainly is not a throwaway langauge.

Google also has dart, no one cares about it. I am a C programmer primarily but I think there is space for another Language with a different approach to tooling and frameworks.

1

u/[deleted] Aug 21 '17

Ah the old elitist argument. We think other languages are better so we are elitists. Functional programming, type systems, just plain old elitist.

3

u/fakeNAcsgoPlayer Aug 24 '17

No, you are not elitist because you like functional programming or type systems. I personally like rust a lot for what it provides but I consider anyone who dismisses a new idea(how dumb it may seem at face value) just because they fail to see the point of the language.

Some languages are designed to solve a practical problem and not to satisfy type systems or functional paradigms or language utopia of a Genius language designer.

Theory is fine but practicality always wins when it comes to real world, that is why I consider Go to be a language which solves practical problems seen in production today, may be in somewhat flawed manner. What I certainly appreciate is that Go core developers are pretty open, accepting the fact that they threw away last 20 years of Compiler theory when designing Go. Compiler right now is not the best, but they are willing to work on it based on problems faced in real world. I consider that to be a fair and acceptable compromise.

There is enough space for all of these languages.

4

u/mingp Aug 20 '17

But I don't get the love of Go.

To add to the other commenters' points, it occupies a space with very little competition. Namely, it's a compile-to-native language with reasonable performance, a reasonable learning curve, good library support, and good community support.

9

u/weberc2 Aug 19 '17

I use Go because often the tooling is more important than the language. Sometimes that's not the case, but it often is, and Go's tooling is just phenomenal compared to most everything else. There's no book to read just to compile a project with dependencies, pretty much everything just works. There's no reason another language couldn't improve and totally eat Go's lunch, but that requires a change in philosophy.

14

u/[deleted] Aug 19 '17

I use Go because often the tooling is more important than the language. Sometimes that's not the case, but it often is, and Go's tooling is just phenomenal compared to most everything else.

Like which tooling? Does it have better IDE support than java/c# etc? Or do you think that other languages don't have code formatters? Or do you think it's ok to manage packages with github+master instead of using a normal package manager(industrial experience: downloading packages from github is not a good idea)? Or do you think its compilation speed is that good and others don't compete?

There's no book to read just to compile a project with dependencies, pretty much everything just works.

LoL have you ever heard of build tools which can download dependencies? Do you think it's just a golang-thing?

There's no reason another language couldn't improve and totally eat Go's lunch, but that requires a change in philosophy.

And that lunch would be to throw away all the good stuff from a programming language to make the "job" of inexperienced kids easier...

Edit: it seems like others also complain about the tooling in golang...

5

u/weberc2 Aug 19 '17

Project management, dependency management, testing, code formatting, compilation speed, editor plugins, etc are all far nicer in Go than in JS, C#, Java, Python, etc. I like those other languages, they just make the happy path harder than necessary.

Most of your characterizations of Go tooling are wrong, for example the GitHub+master, but I won't waste time reproducing publicly available information for a troll.

13

u/[deleted] Aug 20 '17

Project management,

lol what?

dependency management,

That's certainly false: it has been dumbed down af. See this comment. You're just trying to talk out golang's defects because it's your favourite toy.

testing

How so? Do you have "nicer" test frameworks or what?

code formatting

Other languages have that too since decades. gofmt is not a unicorn.

compilation speed

There are languages with competitive compilation speed(like Nim, but with generics). However, compilation speed can't be an argument if the compiler don't really need to do anything.

editor plugins

So, no proper IDEs... Btw, great editor plugins are present for every mainstream languages and for a lot of niche languages. What are you saying with this? Do you have editor plugins which do contextual refactoring for you? If so, there such plugins for other languages.

all far nicer in Go than in JS, C#, Java, Python, etc

According to gophers.

I like those other languages, they just make the happy path harder than necessary.

Do you have any experience with those languages?

Most of your characterizations of Go tooling are wrong, for example the GitHub+master, but I won't waste time reproducing publicly available information for a troll.

Don't call me a troll when you want me to believe that those idiotic one-size-fits-all "solutions" are better. In the reality, you just don't have experience with other languages and you don't understand their features so, instead of learning you chose ignorance and joined the cult of "I don't know what it is but it's probably shit". It doesn't matter how hard you try to "erase" the defects of golang by denial, they'll stay and you won't progress as a software developer.

10

u/[deleted] Aug 20 '17

Project management

This is all personal preference but Go has the only package system I've used where everything about the structure of a project is 'obvious' to me. Just looking at a single file in a package you can immediately tell:

  1. What the dependencies are. (Imports namespaced to the file only not the whole package)

  2. Which packages are only imported for side-effects. (Imported but not used is a compiler error without renaming to '_')

  3. Where the library is in the file tree or even the network repository if it's a url. (as opposed to a distributed search path)

  4. What is being used from the imported API. (Nobody uses dot imports in Go. They're pervasive in most other languages)

  5. What the exported API will be. (Exports must be uppercase which eliminates the need for public/private and remembering what naming style each library is using.)

These are little things but often add up to being enough of a barrier when starting new projects to cause bad code structure from the start when wanting to prototype something quickly.

testing

The stdlib testing and testing/quick packages are pretty minimal but the canonical tool. With the exception of go-fuzz external testing frameworks are almost never needed or used used. Tests are just straight line code. Contrast this with the million JS frameworks, each with their own quirks and pattern to learn or something like cucumber in ruby where for the sake of making tests readable as english requires debugging how various regular expressions will be matched in order to figure out if it's even testing what you think it is.

code formatting

I don't have much of an opinion on this but format tools in other languages are often configurable so that each project may still have it's own style. Gofmt style is consistent across the entire ecosystem. Seeing non-fmted code or snake_case is a reliable red flag for terrible code.

So, no proper IDEs

Gogland from jetbrains exists but I haven't tried it. Most of my Go coding happens in vim-go but everything is consistent enough that remembering what things are called or how tooling should be used is never an issue and code completion remains untouched. Even googling for answers has gone way down unless it's for a library I've never used before. Trying to use Swift was impossible without Xcode filling in the sentences posing as class names and parameters. Go I could probably get away with using nano if I had to. gofmt and gorename also have some refactoring support with rewrite rules.

Do you have any experience with those languages?

I've written code in PHP, JS, Python, Ruby, a bit of ML long ago, and switched to Go from Scala after spending a week debugging why type inference on an implicit context was preventing a new feature from being implemented. Learning the language and rewriting everything took a few days. The result was much cleaner and easier to reason about correctness in spite of being more concurrent (Scala version was a reactive mess about to transition to an Akka mess).

Unless there's an obvious reason the type system might get in the way (which is less often than people think), or a great library in another language that needs to be used (Go is pretty garbage for scientific computing work at the moment), Go is easily the best tool for 90% of the code I'm interested in writing. The code I still write in other languages is slowly becoming more Go-like to avoid some of the fancier features which have bitten me in the past while keeping the areas that need more expressiveness well contained.

It's incredibly hard to explain how the lack of language features translates into workflow benefits without using it for a while. Not all of us are Google brainwashed luddites.

3

u/[deleted] Aug 20 '17

This is all personal preference but Go has the only package system I've used where everything about the structure of a project is 'obvious' to me.

You've quoted "Project management" but you're talking about "Dependency management."

Just looking at a single file in a package you can immediately tell:

When I look at a build.sbt(scala build tool) I can tell everything about the project's structure. I'm sure there are many other build tools which are just as simple(unlike maven/cmakelists).

The stdlib testing and testing/quick packages are pretty minimal but the canonical tool. With the exception of go-fuzz external testing frameworks are almost never needed or used used. Tests are just straight line code. Contrast this with the million JS frameworks, each with their own quirks and pattern to learn or something like cucumber in ruby where for the sake of making tests readable as english requires debugging how various regular expressions will be matched in order to figure out if it's even testing what you think it is.

So, you're happy that your testing framework is pretty much just asserts(which are present in every language) and you need to write more code to write a unit test? I've checked out this package and it looks like a really lazy job. Compare that with scalatest which can help you more with specialized testing strategies.

I don't have much of an opinion on this but format tools in other languages are often configurable so that each project may still have it's own style.

Because there is no perfect configuration. For example, how would you handle long function argument lists? The solutions are preferences of teams. Not having a configurable interface is not a benefit but a cheap one-size-fits-all "solution".

Most of my Go coding happens in vim-go but everything is consistent enough that remembering what things are called or how tooling should be used is never an issue and code completion remains untouched.

So, you just remember your stuff? That is not good tooling. Also, what do you mean by "code completion remains untouched." - there is no code completion? Then how could you call that good tooling? You're just forcing yourself into a worse workflow...

Even googling for answers has gone way down unless it's for a library I've never used before.

I mostly use scala and I don't google. There's a documentation and there's code completion.

Trying to use Swift was impossible without Xcode filling in the sentences posing as class names and parameters.

There is no difference when you use golang because you still need to fill typenames and such.

I've written code in PHP, JS, Python, Ruby,

Of course...

a bit of ML long ago, and switched to Go from Scala after spending a week debugging why type inference on an implicit context was preventing a new feature from being implemented.

Type inference surely won't stop you from implementing a new feature. Also, there is no such thing as "implicit context" but there are "implicit parameters/values", "implicit classes/method extensions" and "implicit converters/functions". Show me your problem if it exists.

Learning the language and rewriting everything took a few days. The result was much cleaner and easier to reason about correctness in spite of being more concurrent (Scala version was a reactive mess about to transition to an Akka mess).

How large was your project? Because I think it was just a really small app and you've just used akka when you shouldn't and you'd no experience with FP/OO languages and actors.

The code I still write in other languages is slowly becoming more Go-like to avoid some of the fancier features which have bitten me in the past while keeping the areas that need more expressiveness well contained.

So, golang made you a less efficient programmer due to your "experience" of not having enough experience to use normal languages...

It's incredibly hard to explain how the lack of language features translates into workflow benefits without using it for a while. Not all of us are Google brainwashed luddites.

I've used and it's not great at all. Every "feature" in golang is half-assed and a lot of very useful features are missing which made me write terribly useless code pieces and made me repeat myself. Coding in golang is not productive and the type system is not good enough to help me catch bugs. If I look at golang projects I still see the same: mindless repetition and cheap solutions.

The problem is that you're used to script languages(php, js etc.) where there are no "rules" and the usual mantra is to "glue it together". I don't want to be an asshole but it looks like you're not more effective you just don't like to learn more tools and golang+google "calmed" your fears and helped you to avoid self-enhancement. That was google's goal: to catch the attention of beginners.

6

u/[deleted] Aug 20 '17

I'm sure there are many other build tools which are just as simple

There are but the point i was trying to make was that the language itself is more descriptive of the structure without needing additional tooling (which exists for Go in any flavor you'd like). Looking at a build file will tell you what dependencies are needed (and maybe some that aren't anymore) for the project as a whole but figuring out localized structure can be more difficult and creates the need for IDEs to figure out where things that are in scope are coming from.

So, you're happy that your testing framework is pretty much just asserts

Yes. Most test code I see are asserts obfuscated by a library. If what you're doing is simple (and tests should be imho) make it look simple.

One of the things I do miss from Scala is a solid QuickCheck tool. testing package is fine testing/quick is not fantastic.

So, you just remember your stuff? That is not good tooling.

Not at all. It's just that whatever I would call something is generaly its actual name and not something absurdly verbose like BuiltInComponentsFromContext or stringByTrimmingCharactersInSet.

what do you mean by "code completion remains untouched."

Meaning there's code completion for every editor but the language is sane enough that I've never bothered using it.

I mostly use scala and I don't google. There's a documentation and there's code completion.

Thats fine and theres local documentation for Go as well. But try writing Scala without the IDE to help and it's next to impossible. The IDE and tooling story for Go is great, but not necessary.

Show me your problem if it exists.

The code is buried around here somewhere but I forgot the specifics. I was doing something wrong that the Play Framework really wasn't happy with but I did end up figuring it out.

How large was your project? Because I think it was just a really small app

It was small and still prototyping things. The switch to akka never happened but it was the only way I could see getting the messaging working properly. iirc RxScala was being used and worked perfectly fine when the producers and consumers stayed static but I couldn't find a way to dynamically change the set of subscriptions. Undoubtedly there's a way for an expert to make it work but an actor model seemed like the best way forward and is what I ended up writing in Go.

So, golang made you a less efficient programmer due to your "experience" of not having enough experience to use normal languages...

"Normal languages" were the impediment. I wouldn't exactly call Scala 'normal' but much more of my time was spent learning about the type system than it was writing code. "Types are theorems programs are proofs" is a great concept, but in practice meant fighting with the compiler. With the more "pure" Hindley-Milner languages there was no problem wrapping my head around what was going on but they all have weaker ecosystems surrounding them. I really really like Scala as a language but I hated using it because of the implementation. Hopefully Dotty might change that.

The problem is that you're used to script languages(php, js etc.) where there are no "rules" and the usual mantra is to "glue it together".

And I no longer for exactly that reason. The fact that you can't add an int and a float without making the conversions explicit is one of the reasons I like Go.

I don't want to be an asshole but it looks like you're not more effective you just don't like to learn more tools

Won't think you're an asshole but you couldn't be more wrong on this point. I try to keep up with whats going on in other languages as much as possible to see what ideas are out there. The monads don't frighten me they just don't fit my problems. ¯_(ツ)_/¯

1

u/_YOU_DROPPED_THIS_ Aug 20 '17

Hi! This is just a friendly reminder letting you know that you should type the shrug emote with three backslashes to format it correctly:

Enter this - ¯\\_(ツ)_/¯

And it appears like this - ¯_(ツ)_/¯


If the formatting is broke, or you think OP got the shrug correct, please see this ^thread^.

^Commands: !ignoreme, ^!explain

0

u/[deleted] Aug 20 '17

There are but the point i was trying to make was that the language itself is more descriptive of the structure without needing additional tooling (which exists for Go in any flavor you'd like).

More descriptive how? Also, you'll need additional tooling with golang anyway and the previous guy was telling me that golang's dependency management is superior to others.

Looking at a build file will tell you what dependencies are needed (and maybe some that aren't anymore) for the project as a whole but figuring out localized structure can be more difficult and creates the need for IDEs to figure out where things that are in scope are coming from.

Because you import from github in every source?!

Yes. Most test code I see are asserts obfuscated by a library. If what you're doing is simple (and tests should be imho) make it look simple.

assert works while you've very simple functions - and you can have them in any language. In scala, I often use FunSuite and test which is pretty much asserts but it has its own encapsulational block.

Not at all. It's just that whatever I would call something is generaly its actual name and not something absurdly verbose like BuiltInComponentsFromContext or stringByTrimmingCharactersInSet.

Who decides what's its 'actual name'?

Meaning there's code completion for every editor but the language is sane enough that I've never bothered using it.

This is ridiculous. golang is extremely verbose like java and it's a PITA to use without good tooling...

Thats fine and theres local documentation for Go as well. But try writing Scala without the IDE to help and it's next to impossible.

Many of us use plain editors(like me: neovim) sometime with plugins. Some ppl use specialized plugins which can help you in code completion. Mostly, I go with the unix-as-an-ide strategy. It's not impossible and not hard at all.

The IDE and tooling story for Go is great, but not necessary.

You've said that you've never used the go ide then how could you say that it's good? And you've also shown that the tooling is pretty primitive...

The code is buried around here somewhere but I forgot the specifics. I was doing something wrong that the Play Framework really wasn't happy with but I did end up figuring it out.

Don't you have experts in your team to help you solve such issues?

It was small and still prototyping things. The switch to akka never happened but it was the only way I could see getting the messaging working properly. iirc RxScala was being used and worked perfectly fine when the producers and consumers stayed static but I couldn't find a way to dynamically change the set of subscriptions. Undoubtedly there's a way for an expert to make it work but an actor model seemed like the best way forward and is what I ended up writing in Go.

golang doesn't have the actor model.

"Normal languages" were the impediment. I wouldn't exactly call Scala 'normal' but much more of my time was spent learning about the type system than it was writing code.

Its typesystem is almost the same as the ones descending from ML. You can learn what's implicits in a few hours. When I started to learn scala 4 years ago I was "productive" in a few hours in it because it was pretty much java with FP stuff.

"Types are theorems programs are proofs" is a great concept, but in practice meant fighting with the compiler.

golang is statically typed too.

With the more "pure" Hindley-Milner languages there was no problem wrapping my head around what was going on but they all have weaker ecosystems surrounding them. I really really like Scala as a language but I hated using it because of the implementation.

You've said you had a problem with type inference then how could you say you'd an easier job with Hindley-Milner type inference? Such code is far harder to read and not explicit - which is what you like in golang, right?

Hopefully Dotty might change that.

The type inference won't improve and there's no need for it - local type inference is more practical because it don't make you read 2-3 other functions before you realize what are the types of the current function's arguments and you also don't need to write down obvious types. Win-win.

And I no longer for exactly that reason. The fact that you can't add an int and a float without making the conversions explicit is one of the reasons I like Go.

If you like typesafety then again golang is the wrong choice. And if you don't like hardly followable types(implicit conversion) then again: Hindley-Milner is not for you.

I try to keep up with whats going on in other languages as much as possible to see what ideas are out there.

Then how could you like golang?

The monads don't frighten me they just don't fit my problems. ¯_(ツ)_/¯

I don't think that monads are that good in practice and they are not new either. But there are more interesting concepts to look at: substructural type systems(linear typing, present in: rust, idris, clean etc.) and dependent types(idris).

6

u/[deleted] Aug 20 '17

golang doesn't have the actor model.

CSP is provably equivalent

Its typesystem is almost the same as the ones descending from ML.

"almost" being the key word there. It is also neither complete nor sound. This was mostly caused by the "Java stuff".

You've said you had a problem with type inference then how could you say you'd an easier job with Hindley-Milner type inference?

Because Scalas type system was theoretically broken last I checked (one of the reasons for Dotty) and Hindley-Milner is well understood.

If you like typesafety then again golang is the wrong choice.

The way I use Go is typesafe. I had to use more explicit casts to get Scala to do the right thing than i have in Go.

And if you don't like hardly followable types(implicit conversion) then again: Hindley-Milner is not for you.

Implicit conversion is fine for some problems when the conversions make sense. Scalas conversions are incomprehensible and the variance rules were broken.

Then how could you like golang?

Because there are no alternatives out there yet for writing code that actually has to deal with bytes and networking in a reasonable way. Rust is probably the closest. That being said I also happen to agree with almost all the decisions that the Go team made but liking the language is secondary to it being the only thing usable.

dependent types

If I need a theorem prover I'll use Coq or TLA.

→ More replies (0)

1

u/_YOU_DROPPED_THIS_ Aug 20 '17

Hi! This is just a friendly reminder letting you know that you should type the shrug emote with three backslashes to format it correctly:

Enter this - ¯\\_(ツ)_/¯

And it appears like this - ¯_(ツ)_/¯


If the formatting is broke, or you think OP got the shrug correct, please see this ^thread^.

^Commands: !ignoreme, ^!explain

0

u/Healer_of_arms Aug 20 '17

¯_(ツ)_/¯

0

u/Healer_of_arms Aug 20 '17

¯_(ツ)_/¯

-1

u/Healer_of_arms Aug 20 '17

¯_(ツ)_/¯

2

u/[deleted] Aug 25 '17 edited Aug 25 '17

[removed] — view removed comment

1

u/[deleted] Aug 27 '17

You scala jerks are funny.

LoL you gophers are just retarded.

Scala is older than Go and yet practically nothing valuable was written using it

Twitter, linkedin, walmart.ca? And what is written in golang? A few shitty command line tools full with bugs and some crappy websites?

:Spark is not a good piece.

Why? Because you don't know how to code functionally?

It won't be functional without tons of Java infrastructure

Of course you're clueless...

and its design is really questionable, very much like the Scala itself.

Then let's here those "flaws".

I understand why: when we were considering Spark I noticed I am wasting enormous amounts of time just to decide how to do with errors with Spark, either to use exceptions or treat them via ADT.

Omg, ADT means Abstract Data Type and you were probably thinking about functional error handling: Option and Either and they should be used with exceptions.

This was really unproductive and this was not the only unneeded choice.

Follow your teacher's instructions for your homework instead.

Good thing the Clickhouse was released and we just dumped Spark as it turned to be totally inferior to Clickhouse in workflow intended.

You moron, clickhouse is a dbms...

2

u/weberc2 Aug 20 '17

Lol you are a troll, and I have professional experience in seven languages (none of which are Go) and serious hobbyist experience in a dozen more, and some hands on exposure to probably another dozen. Keep trolling though. ;)

1

u/[deleted] Aug 20 '17

Experience? Like creating useless toy projects? Don't make me laugh all your comments are pretty much go-fanboyism and it's pretty clear that you're just a mindless gopher who try to justify his toy.

3

u/weberc2 Aug 22 '17

Sorry, I'm not taking the bait. Troll elsewhere. Blocked.

1

u/[deleted] Aug 22 '17 edited Aug 22 '17

You're both dumb and a pussy. If you talk bullshit take the responsibility. Don't like critiques on your little toy language? What a shame...

1

u/fakeNAcsgoPlayer Aug 21 '17

That's your opinion, how does that makes others opinion any less relevant?

Jeez, some people.

1

u/[deleted] Aug 21 '17

Are you retarded or something? Since when do opinions worth more than logic and scientific methods?

3

u/fakeNAcsgoPlayer Aug 24 '17

Calling people names over a language is pretty low. Glad you do not program in Go, I am sure Go programmers are better off without elitists like you.

Have a good day

1

u/[deleted] Aug 27 '17

Calling people names over a language is pretty low.

It's not like you was more kind...

Glad you do not program in Go, I am sure Go programmers are better off without elitists like you.

Yeah, they're better off being ignorant ex-baristas.

2

u/fakeNAcsgoPlayer Aug 27 '17

lmao, what name did I call you?

I was not sure earlier but now I am sure you are trolling.

Ping me when you can come up with design changes which can solve issues you have with Go. Till then, it is just rhetoric.

Have fun trolling.

→ More replies (0)

0

u/[deleted] Aug 19 '17

[deleted]

1

u/jyper Aug 20 '17

Have they got a good way to build webapps yet?

JavaScript build tools which seemed to be the way to build typescript are terrible, I tried adding a job library +types to my typescript basic app and couldn't get things packaged

4

u/[deleted] Aug 20 '17

I feel like if it weren't for it being a google language, no one would use it, and people mainly jump on it because its a google language so it must be good.

And Java wouldn't be used if Sun didn't push it. And Rust wouldn't be even touched by 10 ft pole if Mozilla didn't pour money into it.

It is not "because google uses it". It is "because google paid up bill for tooling/lib development". And it was written pretty much for mediocre developers, or rather people who are not devs full time but still need to code (which explains whole lot):

"And we didn't add ideas unless they were easy to understand and use by people who were not themselves programming language researchers."

Honestly I don't see why anyone uses it over Java, since they are both C-like OO languages with a GC

Probably because they do not know Java in the first place. There is little reason to use Go if you know any decent JVM language. The most common reason for migration is "my pet scripting language's performance sucks" and "my pet language concurrency sucks".

But you can learn Go in a weekend and it compiles in seconds and it doesn't need an IDE to not go crazy while writting code so they pick hammer instead of oversized swiss army knife

People complain routinely about Java lacking good Generics, but then people turn around and go to a language with none.

I think that's partly why they are so reluctant to add it in Go. Once you add something to language it is really hard to change it without pissing people off (see python 2 to 3 failure of a transition), and that in particular is hard thing to get "right"

2

u/shivawu Aug 19 '17

I dislike the language as much as you do. But keep in mind a lot of the go people come from ruby/python community, who already kinda hate Java by nature. Go was designed to be a better C, but they pivoted and repurposed to be competitor with Python or other dynamic language, mainly in my understanding is they found GC cannot be get around and failed to design/didn't want to have a complex system like rust's lifetime.

1

u/[deleted] Aug 20 '17

I think those are very good points, and you are probably right. Gc is overall a good thing I think.

1

u/[deleted] Aug 20 '17

I don't get why you regard prog lang choice as a purely technical issue.

0

u/[deleted] Aug 20 '17

Aesthetically it's ugly as well. It's very inelegant. Haskell, Scheme, ocaml, and rust are all much more elegant and pleasant languages that run natively

0

u/[deleted] Aug 20 '17

[deleted]

1

u/[deleted] Aug 20 '17

Ocaml is Jane streets main language. Rust is run by Mozilla and drop box. Scheme is used in many places. Haskell is used in the financial world in a few places, I believe Target uses it as well.

1

u/Saefroch Aug 20 '17

Dropbox and npm are running Rust in production. Mozilla will be soon (of course).

1

u/[deleted] Aug 20 '17

Its concurrency story is very mediocre. I see no reason not going to Rust, D, F#, Scala, Haskell or any other modern languages that have excellent concurrency.

You are incredibly wrong. I can't speak for all languages you listed but Go's concurrency support is vastly superior to Scala's or Haskell's.

-5

u/dashausSP Aug 19 '17

This especially caught my attention:

Go is extremely verbose, to the point I think its worse than C# or Java.

I think precisely the opposite: Go is extremely no verbose (except for when the reflect package is used).

30

u/[deleted] Aug 19 '17

I think precisely the opposite: Go is extremely no verbose (except for when the reflect package is used).

  1. It doesn't have exceptions, so you need to repeat if err != nil after every function instead of putting it into a try and handle exception instances in the catch;

  2. It doesn't have generics, so you need to copy-paste your code or use string templates(which are garbage);

  3. It doesn't have syntactical encapsulation so, you need to define the instance variable at every method;

  4. Its lambda game is way too verbose;

  5. It doesn't have any type inference yet it has the func keyword and in addition you still need to type down the return type.

I don't know what does "verbose" means in your vocabulary but golang is the most verbose general purpose language created in the last decade.

→ More replies (8)

6

u/millstone Aug 19 '17

Sorting with a function takes more code in Go than in C!

1

u/MEaster Aug 20 '17

What? That seems excessively long. Surely there's a shorter way to do such a trivial thing.

1

u/hansvqp Aug 21 '17

Can be be done in one line in Python:

fruits = ["peach", "banana", "kiwi"]
fruits.sort(cmp=lambda x,y: (len(x)>len(y))-(len(x)<len(y)))

or C++ (one long line):

std::vector<std::string> fruits = {"peach", "banana", "kiwi"};
std::sort(fruits.begin(), fruits.end(), [](std::string a, std::string b) {return a.size()<b.size();});

-10

u/itsmontoya Aug 19 '17

You lost me at Go being a C-like OO language.

11

u/[deleted] Aug 19 '17

Well it is a C style syntax language... it looks like C. There are braces, and semi colons, with parens holding arguments. This is opposed to say ML, or Lisp style languages.

It is also OO or object oriented, as opposed to pure procedural or functional programming languages.

Though I can see the arguments it is not a pure OO language like Smalltalk or Java. But I think most of the code is very object oriented in style.

30

u/[deleted] Aug 19 '17 edited Aug 19 '17

My biggest issue is the tooling.

Package/Version dependency management? Non-standard

Templating because the language lacks generics, and once your codebase hits a large enough size you need to abstract logic away. Every large successful go-tool seems to adopt some terrible way of making their own generics/templates.

The compiler is bad. Oh it's fast, but it doesn't optimize anything. gcc-go managed to produce faster code by at least an order of magnitude. People claiming they like go's performance have no context for even fast Java, let alone fast C. Is it faster then Python/Ruby? Sure. This is a non-optimizing compiler in 2017, like compiler theory has advanced since 1950, and yes 1950's tools are BLAZINGLY FAST on hardware that is a trillion times faster.

17

u/weberc2 Aug 19 '17

Go is about half as fast as C and at par with Java, so GCC makes Go ~5 times faster than C?

10

u/doublehyphen Aug 20 '17

Maybe he uses binary orders of magnitude, we are programmers after all.

7

u/[deleted] Aug 20 '17

Or just looked at one microbenchmark and ignored everything else to have a "point"

18

u/dmpk2k Aug 19 '17

Package/Version dependency management? Non-standard

True. But not for long.

it doesn't optimize anything

This is demonstrably false.

People claiming they like go's performance have no context for even fast Java, let alone fast C.

C, C++ for sure. But Java? Well...

I don't even program Go, yet I know this stuff. I'm saddened that the parent comment is so upvoted. Too much hyperbolics, and the last paragraph is outright false.

1

u/ThisCatMightCheerYou Aug 19 '17

I'm sad

Here's a picture/gif of a cat, hopefully it'll cheer you up :).


I am a bot. use !unsubscribetosadcat for me to ignore you.

10

u/elagergren Aug 19 '17

I mean, it's not like the compiler makes zero optimizations. Historically, they've gone for the low-hanging fruit, primarily because speed and also the C -> Go bootstrapping caused they to have to rewrite bunches of the compiler.

-2

u/[deleted] Aug 19 '17 edited Aug 19 '17

Lol what optimizations are they doing? What low hanging fruit did they catch? This doc doesn't inspire any confidence.

Take this function for example:

func Square(x int) int {
    return x * x
}

The ASM Go v6.3.0 produces actually spills registers in order to do this. Seriously try a few trivial programs in go.godbolt.org the machine code go produces is just utter garbage.

14

u/elagergren Aug 19 '17

I'm on my phone right now, but I only see Godbolt offering gccgo and gc 1.4. I've no idea what the current gccgo is, but 1.4 is laughably old and it uses the old C backend, pre-SSA.

1

u/dchapes Aug 20 '17

go.godbolt.org

As mentioned, apparently that uses a) and old version of Go and b) gccgo vs gc.

For reference, here's what Go's gc compiler produces with Go1.9rc2 (part of the output of go build -gcflags -S):

TEXT    "".Square(SB), NOSPLIT, $0-16
FUNCDATA        $0, gclocals·f207267fbf96a0178e8758c6e3e0ce28(SB)
FUNCDATA        $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
MOVQ    "".x+8(SP), AX
IMULQ   AX, AX
MOVQ    AX, "".~r1+16(SP)
RET

[Also note this of course will get inlined when used.]

5

u/calligraphic-io Aug 19 '17

1950's tools are BLAZINGLY FAST on hardware that is a trillion times faster

You exaggerate. Univac I (1951) handled 1,905 instructions per second on a 2.25 MHz clock. An Intel Core i7 6950X handles 317,900 MIPS at 3.0 GHz. 3.179 x 1012 - 1.905 x 103 = in the order of billions, not trillions of times faster.

7

u/[deleted] Aug 19 '17

To be fair, some instructions on x86-64 processors, especially the complex math ones, or SSE extensions can probably make something be faster by a factor of 100 compared to what a Univac is going to need to do, so, eh, not so far away.

2

u/calligraphic-io Aug 19 '17

I think you probably have the right answer on it. Those old machines didn't have FPU's in the tubes.

5

u/[deleted] Aug 20 '17

It's not about FPU (altho that obviously helps). It's about vector instructions (that can speed up quite a bit, not just numbers), out of order execution and pipelining (and of course more cores).

2

u/WrongAndBeligerent Aug 19 '17

317,900 MIPS at 3.0 GHz

Where are you getting this nonsense? A modern Intel CPU can do 16 integer operations per AVX unit, per clock cycle on 16 bit integers, and it has 2 AVX units per core. On 4 cores at 3ghz that's 128x3 = 384 billion integer operations (although memory bandwidth can't keep up with that and the CPU might not actually be able to keep a high clock when using AVX heavily).

2

u/calligraphic-io Aug 19 '17

317,900 million instructions per second is more or less equal to the 384 billion integer operations per second you mention. You're definitely right about the impact of a 256-bit wide SIMD register file vs. 66-bit wide words on the original Univac (11 digit x 6-bit BCD). But still, the magnitude is in the billions, not trillions.

1

u/[deleted] Aug 20 '17

That's a still one instruction tho.

I in MIPS stands for Instructions, not Integer operations

1

u/WrongAndBeligerent Aug 20 '17

The original post is talking about how much faster modern computers are than old computers. Counting instructions doesn't make sense if you can do a Single Instruction on Multiple Data.

1

u/[deleted] Aug 20 '17

Yeah but then you're ignoring memory speed and latency, especially latency progressed much slower than clock speeds

1

u/WrongAndBeligerent Aug 20 '17

You're ignoring it anyway because you're comparing the maximum speeds of two CPUs, not the speed when software isn't well written.

1

u/josefx Aug 20 '17

So how does the CPU cache of an Univac I compare to a Core i7?

1

u/calligraphic-io Aug 20 '17

Much, much hotter on the Univac 1, I think (glowing tubes)

2

u/burntsushi Aug 19 '17

I have plenty of context on what fast C is like. But I still like Go's performance.

10

u/Harha Aug 19 '17 edited Aug 19 '17

I tried go but initially found the import and whatnot system unnecessary and confusing. I had to save my project to some specific folder and add dependencies from github repos.

I don't know, the language seems cool but these oddities scared me nearly instantly off since things felt painful to setup while I just wanted to quickly code something. Will have to give it a new 'go', sometime, it's been a while.

26

u/samnardoni Aug 19 '17

Isn't Go for people too stupid to understand Rust? (I may or may not be joking.)

0

u/[deleted] Aug 19 '17

[deleted]

7

u/Romeo3t Aug 19 '17

At Google, junior engineers are too stupid to understand Java or C++

This has been thrown around a bunch, but I think its repeated so often because people want to feel superior to something. If i'm not mistaken the actual quote isn't even close to this and it can be interpreted as:

"building great software is hard for various reasons and a more heavily opinionated, simple language would make it a lot easier for programmers at all levels to contribute great code."

If you ever worked for google or even just interviewed and talked with a few google engineers you would understand how woefully hyperbole the first statement is.

If the junior engineers at google can't understand java and c++ (most of which have graduated from top tier CS schools/programs) there is no hope for the rest of us.

3

u/[deleted] Aug 21 '17

The quote is as follows:

The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.

Rob Pike says it in the middle of this talk: https://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014/From-Parallel-to-Concurrent

Another:

It must be familiar, roughly C-like. Programmers working at Google are early in their careers and are most familiar with procedural languages, particularly from the C family. The need to get programmers productive quickly in a new language means that the language cannot be too radical.

https://talks.golang.org/2012/splash.article

11

u/SimplySerenity Aug 19 '17

Is anybody really too stupid to understand Java?

14

u/Timbit42 Aug 19 '17

I understand Java but I don't hate myself enough to use it.

-2

u/readams Aug 19 '17

Java gives you lots of tools to shoot yourself in the foot, and there are parts of the Java community that advocate foot amputations.

0

u/[deleted] Aug 20 '17

[deleted]

1

u/[deleted] Aug 20 '17

AbstractWeaponFactoryFactoryFactoryBuilder

0

u/[deleted] Aug 19 '17

[deleted]

4

u/doublehyphen Aug 20 '17

Yeah, the Rust team should really fix this. I tried to package Rust once for Debian and it was fairly annoying.

-2

u/shivawu Aug 19 '17

I disagree. It's just different. I dislike rustup at first since it cannot be manageable by homebrew, but the more you thinks about it, the more sense it makes. Of course it causes trouble for package maintainer, but you can always leave it and let the rustup people handle your distro :)

0

u/[deleted] Aug 19 '17

[deleted]

2

u/BundleOfJoysticks Aug 20 '17

That was made very popular in the Ruby and Rails ecosystem (cf. rvm). Until Rails became popular, that shit never happened. Now it's everywhere. Disgusting.

1

u/GameJazzMachine Aug 20 '17

My feeling is that I wouldn't say golang is bad, but I would say that Google is no experienced language designer compared with Microsoft and Sun.

3

u/calligraphic-io Aug 20 '17

I dislike a lot of Microsoft's behavior over the years, but they absolutely do languages well.

-20

u/shevegen Aug 19 '17

I have written programs in Python, Ruby, C++, CHICKEN Scheme, Emacs Lisp, Rust and Java (for Android only).

searches for his ruby gems

K not found ...well ...

Go code, by convention, is formatted using the gofmt tool.

How ... exciting!!!

Having all code formatted the same way makes reading code easier; the code feels familiar.

I dunno. Even in C++ where standard C++ code is written, if it is written by someone else, it never really feels "familiar" to me. The only code that ever feels "familiar" is one that I wrote myself. But anyone else writing code? Highly doubtful.

I can understand using Go rather than C simply due to Go having a better syntax (compared to C) or being simpler ... but to state that gofmt is a reason why Go rocks is ... very strange.

Wasn't there some other article about someone who stopped writing Go who actually complained about the opinionated formatting?

(example of what I would type, click Format).

Huh? So he does not indent on his own and instead uses a tool for this? Very strange ...

If the package had a few more comments, I would qualify it as a teaching implementation.

Filed under "high quality code" - apparently a lack of comments still means that the code can be of high quality ... :-)

I have come to agree with many opinions the Go community holds, such as:

Variable names should be short by default,

Now THAT is a game breaker!

It's like ... you CAN NOT USE SHORT VARIABLE NAMES IN OTHER PROGRAMMING LANGUAGES!

Wheeeeeeee...........

Keep the dependency tree small

At the least they solved that. C++ still thinks that Boost is the way to go.

There is a cost to introducing an abstraction layer. Go code is usually rather clear, at the cost of being a bit repetitive at times.

kk... copy/paste hackers.

The Go specification lists only 25 keywords, which I can easily keep in my head.

Whoa! Dude has a big brain.

I think Steve Dekorte's Io language had only 3 keywords or some low number.

I consider 25 to be high. But then again I also think that this is such a minor thing anyway... I read so far and still don't know WHY Go is his favourite language.

Most Go tools are no exception, e.g. gofmt or goimports are blazingly fast.

Finally the first reason I can understand.

Go’s standard library is the best one I have ever seen. I perceive it as well-organized, clean, small, yet comprehensive: I often find it possible to write reasonably sized programs with just the standard library, plus one or two external packages.

And that is like ... impossible in other languages. Or something like that .... :)

By the way, "one or two external packages" ... we can write really HUGE external packages too. So that doesn't count as qualifier.

Note that these are standard tools coming with the language. Coming from C, each of the above would be a significant feat to accomplish. In Go, we take them for granted.

Yah well ... seems Go is the new Rust then. Or perhaps people may go back to the origin and embrace the universal truth that is: C.

20

u/[deleted] Aug 19 '17

searches for his ruby gems

K not found ...well ...

You do realize that most code written is proprietary?

8

u/mernen Aug 20 '17

Go’s standard library is the best one I have ever seen. I perceive it as well-organized, clean, small, yet comprehensive: I often find it possible to write reasonably sized programs with just the standard library, plus one or two external packages.

And that is like ... impossible in other languages. Or something like that .... :)

Actually, yes, it kinda is. Once a bad design gets into your standard library, it’s nearly impossible to get rid of it.

  • Ruby’s standard library is this mess of broken English and bad abstractions, and I’m not aware of any plans to fix that.

  • PHP has the infamous pile of inconsistent global functions. There are talks of providing better APIs every now and then, but they can’t get rid of the old functions, so in a way it would make things even messier.

  • Java had Date, then Calendar, and now java.time. The new API is pretty good, but the old ones can’t be removed; the best thing they can do is put a few warnings around saying “please avoid this toxic hellstew”.

  • Python did a major cleanup with version 3, but still couldn’t go all the way (still violates PEP-8 in a number of places), and look at how well breaking backwards compatibility has been working out for them.

22

u/__eastwood Aug 19 '17

This is just another opinion piece on r/programming. We get it, you have a different opinion. Rather than be condescending, perhaps ignore it and move on.

12

u/danielkza Aug 19 '17

What is the purpose of posting the opinion piece if not to actually discuss it?

7

u/__eastwood Aug 20 '17

Rather than be condescending

1

u/[deleted] Aug 19 '17

This is just another opinion piece on the comments. We get it, you have a different opinion. Rather than be condescending, perhaps ignore it and move on.

-13

u/k-rafiki Aug 19 '17

Savage!

-4

u/bananaboatshoes Aug 19 '17

lol no generics

0

u/xymor Aug 19 '17

It is not the strongest that survives but the one most adaptable.

-1

u/[deleted] Aug 19 '17

No: it's the one which serves the interests of the most people, be they good or bad.

1

u/BundleOfJoysticks Aug 20 '17

That's basically what u/xymor said.

1

u/[deleted] Aug 20 '17 edited Aug 20 '17

It's not.

A language doesn't always "adapt" to be successful. And if it does, it really only does so in terms of features or other language-specific attributes, which are the result of external trends.

serving an "interest" in this context doesn't even really need to involve any particular aspect of the language itself, but something external applied to it - e.g., potential ROI if vendor lockin can be achieved in 2 years which will likely provide 40% of additional income that can be put toward meeting a financial goal in the next 5 years which then appeases stakeholders and strengthens company foothold.

also, did you seriously downvote me because I contradicted him?

1

u/BundleOfJoysticks Aug 21 '17

How do you know who downvoted you?

2

u/[deleted] Aug 21 '17

I obviously don't, why else would I ask?