Is go good or not?

I want to hear your opinions, Sup Forums.

Other urls found in this thread:

techempower.com/benchmarks/
twitter.com/AnonBabble

determining if go is good is left as an excersise to the reader.

Sure, if you're a bicycle helmet-wearing mongoloid.

Go is a dumbed down version of C with some nice things.
Google needed a system programming language with the speed of C but _safe_ thus Go was born, and because it is _safe_ you can program larger projects with different people.
I like that functions can return multiple values without using unsafe pointer trickery but I hate this:
f, err = fopen("op_is_a_faggot");
if err != nil {
// such advanced error handling
}

would you rather use exceptions?
if so fuck you.

It's aight but it would be great if it had generics. Having to write a queue implementation for every single type I want to use is infuriating.

can't you use interfaces?

Go is good if you're a code monkey at google. There are better options for everyone else

what alternative guarantee employment or high worth?

Java

C or C++

how much worth?

From my experience, dotnet or Java will get you a job in big organizations, startups tend to use whatever's hot shit on HN at the time they're deciding what to use

and which for high worth?

...

Probably R because you weren't an idiot and became an actuarian

high worth comes from not being a fucking brainlet and being able to learn any language or framework needed for the task in less than a week

Build a web app using go and you'll see that its good.

It's good if you're a women or sub-90 IQ nigger.

what do you mean

And I dislike using errno, reading through integer error codes for everything and cutting integer range to have a negatives for one or two error codes. Go's err and multiple return values is consistent. Ignoring exceptions, I still think it's better than enums ala Haskell/Rust/whatever, those create even more horrible patterns.

I find that limiting the language by not offering exception management systems like throw/try/catch is bad since it limits its possible applications.

Therefore i find go too simplistic and unnecessarily restrictive since I can create go's exception management system in C++. Also the whole generics meme (assuming they don't change their minds about that).

But C is okay
Foo* f = malloc(sizeof(Foo));
if(!f){
//advanced error handling here
}
//elsewhere
if(!initFoo(myfoo)){
//advanced error handling here
}

Rust is better.

I find Rust needlessly verbose even compared to C++.
goto error; :^]

My day job is backend web development using golang. I've written web apps using PHP, JS, RoR. PHP / JS become maintenance nightmares and rely on so many external dependencies that bugs are hard to isolate and eliminate. RoR is easy on maintenance but runs slow as dirt.

Go is a little extra work upfront but scales magnificently and bugs are almost always due to sloppy programming and not some weird edge case. This makes them easy to find, and even easier to fix. It also means that bugs are far more rare in the first place.

You can write almost the entirety of a production ready application using only the standard library so there is no constant search for "the best xyz package / gem" for things that should be built into a modern language. since most or all of your code is written by your dev team you never have to worry about some essential dependency not being updated quickly enough or the maintainers up and leaving.

Go is simple by design, and anyone with a decent understanding of programming can be proficient in days not weeks.

When you take into account all the extra features, you get a language that can run anywhere without a VM, build almost anything, and is incredibly stable. In just ten years its 100% production ready and is used in heavy duty commercial applications with next to zero problems for the underlying businesses.

Compare that with PHP, Node, or RoR, where the languages and frameworks have been around for much longer, but anyone who works on such a system is constantly complaining.

Meanwhile, you don't hear much from "Go brainlets" because their code just works. There's nothing to talk about. The one complaint you hear is the forced error handling. Which anyone who writes go professionally will tell you is a godsend. I don't have to review the code of my colleagues and check that they have handled errors - Go and the compiler have done it for me.

Took me a 10 days to write an API from scratch in Go with no prior training.

It is great code to read, god awful to write for my uses. I stopped using it:

- Unused imports is an error (this can be fixed with an editor extension to manage it for you).

- Unused variables is an error. This is incredibly annoying when you're trying to implement an algorithm from a spec or porting code over from another language. You can't run or write it piecemeal, otherwise the damn thing won't build.

- Due to lack of generics, the standard library is annoying. Say you want to get the max of two numbers. You can either:
a.) write the function yourself for the data types you need
b.) Cast them to float64s, call the standard Max function, then cast them back to the data type you're using.

- Number types are all incompatible. While it sounds good in theory, assigning a smaller type (like an int32) to a bigger type (like an int64) requires a cast. C# does it better where you only need a cast when things narrow, because that's where the errors come in.

Overall it has great libraries and an active community, but using it is so fucking frustrating I just went back to (modern) C++.

On top of all this, Go is tightly integrated with Google App Engine. Their logging system, traffic balancing, server scaling, IP address management, and support team blow AWS out of the water.

Production apps that have hundreds of thousands of daily users NEED this stuff and if you use AWS or your own server you are also going to need a small devops army as you grow larger. Your site might be scalable but your company's wallet probably isn't.

In summary:
Millions of concurrent users? [x]
Easy maintenance? [x]
Legible code? [x]
Cross platform? [x]
Easy deployment? [x]
Useful for things other than webdev? [x]
Fewer / nonexistent runtime errors? [x]
Small learning curve? [x]
Hipster bullshit? [ ]
Elitism? [ ]
Married to OOP / FP ? [ ]

> Unused imports is an error (this can be fixed with an editor extension to manage it for you).

> Unused variables is an error. This is incredibly annoying when you're trying to implement an algorithm from a spec or porting code over from another language. You can't run or write it piecemeal, otherwise the damn thing won't build.

Alerts you and forces you to get rid of or comment out dead code. How is this a problem?

> Due to lack of generics, the standard library is annoying

True.

Go is the best programming language.

>Alerts you and forces you to get rid of or comment out dead code. How is this a problem?

Alerts are perfectly fine, forcing is not.
I get what they are trying to do, but it makes it so you can't use the language for exploration.

Do it in a Monad (Either or Maybe).

I know a few languages (Haskell, Go, C, C++, Java, Scala, Clojure, Ruby, Python, Elixir, Javascript).

Go is a fine language, but the error handling patterns get annoying. Rust looks nicer, but I've never tried it. If you're interested in Go, learn it. Knowing C already, it only took a couple hours of reading and experimenting before I was productive in Go.

By the way is scala good or should I just learn regular java?

scala's kinda missed the boat as far as adoption goes. Learn java first to get a job, then probably kotlin will be the next Big Thing on the jvm.

> I just went back to (modern) C++

t. masochist who was raped by his uncle at 8 yo

Golang's fucking antiquated garbage. Its designers are stuck in 1970s and haven't added any new features to it.

It's also autistic... in a bad way.

This. Monadic error handling is comfy as fuck.

It has the most retarded way to parse dates in any language.

not to mention it has the most retarded json encode/decode function

Go is basically "Java for Hipsters" or "C for noobs". You could also call it "HTML for Algo-style languages" or "How to point and click your way through".

It's not bad, but it's not good either. It's extremely powerless (weak operators and data structures), explicit to the point of being anally retentive and dead simple. If you know C, you also can learn Go in two days.

So I suggest you look into it and make a toy app, but it has neither the concurrency power of Erlang nor the raw power of C and it's also not suited for large scale applications like Java is.

But to be fair: it's fun to use, and if you only have a simple backend (where you don't need advanced libraries) or a simple concurrency problem, it's not bad.

You can isolate business logic just fine in node applications, just that common practice in the js world is really poor design with lots of outgoing dependencies. Using typescript interfaces and DI you get fully modular decoupled code.

>Compare that with PHP, Node, or RoR, where the languages and frameworks have been around for much longer, but anyone who works on such a system is constantly complaining.


This is a really bad comparison.

PHP still leverages about a million times more sites Go ever will. It's not beautifull, but it works.

RoR has influenced almost every MVC framework afterwards. And it's still unbeaten in how fast you get a simple CRUD app up and running. It's not for high performance servers, but the development speed is the fastest you can have.

Node is not my cup of tea, but there are enough big sites that use it. Also it's not really a "web framework", it's only backend JavaScript.

Go has the advantages you praised it for, but you have to do everything for yourself. Sure it is fun to use, but it's not the holy grail.

I really want to learn Go but Python is just 2ez

GO hang yourself.

Defeats the whole purpose of having types in the first place.

Go is dumb, Go is doomed to success.

it's net/http library is faster than PHP / Ruby / Nodejs but it's a shitty language. Maybe they improve it in v2.0

is that meant for elementary school kids?

>golang
Yes.

>golang
>v2.0
If you knew the background of golang's creation, you'd never ever think of a v2.0. They'd do a whole another language rather than making a v2.0.

Go is pretty fast techempower.com/benchmarks/
Go is marginally better than the languages you mentioned because it is statically typed.

>slow building code

What the fuck does this even mean? Nobody "builds" the code for backend web services. You just write them and open a port, fuck.