Find a flaw
Find a flaw
Other urls found in this thread:
sjws use it and promote it
Disgusting mascot
Pros:
>good for concurrent programming
>hard to write bad code in (gofmt)
Cons:
>no ternary operator
>true != 1 && false != 0
>packages can get messy
>Find a flaw
:= is the ugliest token construct in any language ever
Poor error handling. It's not nearly as nice as proper exceptions. No generics. Total shit dependency management. The fact that versions can't be specified (I think they're working on fixing this) made it a no go (see what I did there?) for anything even remotely professional.
static typing with no generics
enforced style
exceptions are fucking awful, unchecked exceptions especially
Monadic error handling is ideal. Rust's Result type is more robust than exceptions or Go-style multiple return and also comes with syntax sugar to make it more ergonomic than either.
It was so bad that uriel killed himself over it
>The fact that versions can't be specified
this
having to fork a project just to have the proper version is just a big nono
>multiple returns
gets me every time
The package manager has no versioning.
what's wrong with this
no mature ORM
shitty syntax
no package versioning
It violates the definition of "function"
Does a function cease to be a function if it returns a tuple?
What definition of function implies that there can be only one output?
Anonymous functions are pretty cozy, all the fucking threads, CSP is god and I can use it on Google hardware with AppEngine.
Go is GOAT.
Interfaces are cozy as shit. I use golang.org
Define a Len, Swap, and Less function for a type and bam shits sortable (No C function ptrs needed!)
Everything but goroutines is a flaw in Go.
LMAO package manger always downloads the latest repo off the git and causes random project breakage hahahahaah
If only it had generics now.
I want fucking generics. Having to write something for every type is infuriating.
>inb4 interfaces
No thanks
Other than that I love it. Goroutines and channels are the most comfy way to do concurrency. The standard library is great too
There are preprocessors for that
>exceptions are fucking awful
exceptions are fine if you use them like in erlang - to signal that a piece of your system is in a bad state and needs to be restarted.
rip
>>packages can get messy
personally don't think it's ugly, but it's definitely redundant and when returning several values it can create unintuitive shadowing
>versions can't be specified
it outsource dependency and version management to external tools, you can specify version with git no problem
shitty image compression artifacts
Embarrassingly primitive type system and entirely depend on Googles goodwill.
>if (err != nil)
I bet you think exceptions are acceptable.
:= is fucking awful. It doesn't determine type based on usage, but a best guess based on what value is assigned on the right hand side. So immediate numbers like 0 always end up as a int32 even if its used as a uint64 in a function argument later on. Goddamn worthless.
No generics, the introspection library is the worst thing I've ever seen to compensate. That being said the concurrency support is awesome and the language is very simple.
What NEEDS to happen is someone come along and make Go a target language/runtime for a better language.
Do any languages at all have the kind of type inference you're asking for here?
Lots? Scala I know. I hear there are a few functional languages with better type incerence.
.1+.2
nevermind, it works
best lang I guess
The problem of explicit error handling has already been solved ages ago. Rob decided to ignore that because he's obsessed with simplicity.
Now the users are paying the price by having to make their code more complex.
>The problem of explicit error handling has already been solved ages ago.
What solution are you talking about? Because unchecked exceptions are far more complex than return codes.
Maybe monad.
Rust, even though it doesn't have higher kinded types, gives you an Option and a Result type along with a ? operator that lets you return early without spamming your code with if err != nil { return err }
Ah, we are in agreement then. I'm not familiar with Haskell or monads in general but Rust has a solution that's just as ergonomic as the exception-based solutions in OOP languages while still being as obvious about intent and behavior as C or Go.
On the other hand, checked exceptions are nifty because they don't slow down the expected execution path.
This is true. Checked exceptions look a lot like variant return types if you squint hard enough.
At the very least, the caller side semantics of a function like T foo() throws E; is as clear as a function like foo() -> Result. You know exactly what those functions are going to return, those are robust APIs.
func foo() (T, E) is a little less clear but at least lets you know roughly what you're in for. T foo() // By the way I may throw or I may not, who knows! is garbage.
It's not even widely used *at Google*, where it was fucking developed.
fpbp
Just as half-assed as plan9, developed in a bubble with ignorance for real world use cases. Suitable for relatively dumb network servers (ie. not much real work to do besides network I/O) with high concurrency requirements.
>>no ternary operator
>>true != 1 && false != 0
you're an idiot
>Poor error handling. It's not nearly as nice as proper exceptions.
there's no such thing as proper exceptions
>No generics. Total shit dependency management.
meh
>enforced style
you're an idiot
>no mature ORM
>shitty syntax
you're an idiot
retard
retard
>Having to write something for every type is infuriating
you're probably doing it wrong
>Goroutines and channels are the most comfy way to do concurrency.
agreed
>The standard library is great too
great as in big, not so great in design/quality
>scala
any decent ones?
>checked exceptions are nifty because they don't slow down the expected execution path
has nothing to do with checked/unchecked
try reading next time
>t. butthurt
func DoSomething(isTrue_ const bool) { // impossible to make constant parameters
var l List; // does not exist
for _, s := range l {
// your code
}
var v = GetInterface(isTrue_);
if v { /* invalid; you must compare it to nil */
// error code
} else {
// regular code
}
}
I have to say, not having to worry about exceptions is glorious. It's way too easy to forget a try/finally around something important.
>oh look, I copypasted shittiest code from other language and it doesn't even compile
You're probably a brainlet so it should be perfect for (You).
turns out it doesn't work on variables
shit lang