Nice. I just found you channel.. I'm loving all the videos. I have created a golang club with my students in an brasilian university. The goal is to teach them why golang is so nice :).. Thanks for your videos
Now this actually ended up surprisingly unhelpful... one super basic thing: how can I get a stack trace of the error? Can't really debug without a stack trace, right?
Golang really needs special syntax for error propagation (like Rust '?' operator), because Im building a parser in golang and im just tired of checking if err != nil {} after every function call
Cannot agree 😅 Every new "feature" increases complexity. Why don't you build a helper function for that? Rust's "?", "or_else", "end_then", and so on operators don't make the code easier to read or to understand. But that are different "zen" approaches behind these languages. JavaScript ES3 was simple, ES2021 is not; C++ v2.0 was understandable, C++20 is not. KISS 🤗
@@TJ-wc3iq how am I supposed to build a helper function? All my constructions look like: res, err := self.ParseSomeStatement() if err != nil { return nil, err } and yep, doing like return self.ParseSomeStatement() isn't my case. I always need to manually check if err != nil. This problem can be potentially solved with a macro system but there is no macro in golang! Despite the fact simplicity is a kinda advantage of golang, the language really lacks a lot of important and necessary things. And it is sad to see that the go community simply denies the obvious drawbacks. Btw you forgot about DRY principle. And finally, for me it was a big surprise that it is easier to write clean and short code in Rust which is a systems programming language without GC than in simple go. Thats it
absolutely true, error handling in go is a shit show. for every line of code you need to add at least 3 lines for error handling. thats a overhead of at least 75%. thats + the inability of go to handle dynamic data structures led me to discard my golang efforts. sadly i actually like Golang.
You could have talked about capturing specific errors. As it is the most confusing part, specially when it comes from outside your project, like a framework.
error handling in go is a shit show. for every line of code you need to add at least 3 lines for error handling. thats a overhead of at least 75%. thats + the inability of go to handle dynamic data structures led me to discard my golang efforts. sadly i actually like Golang.
ok that's disgusting way to handle error.. smmh.. this problem is long going problem is go ecosystem and yet the go author dont give a shit about it.. union data type is the way to go
📝Get your *FREE Golang Cheat Sheet* -
golangdojo.com/cheatsheet
thankyouu
Ehy Dojo, I add my email address...but I haven't receive any cheat sheet :/
Nice. I just found you channel.. I'm loving all the videos. I have created a golang club with my students in an brasilian university. The goal is to teach them why golang is so nice :).. Thanks for your videos
Sounds awesome! Golang is the GOAT!
Now this actually ended up surprisingly unhelpful... one super basic thing: how can I get a stack trace of the error? Can't really debug without a stack trace, right?
Thanks man!
Golang really needs special syntax for error propagation (like Rust '?' operator), because Im building a parser in golang and im just tired of checking if err != nil {} after every function call
Agreed ;)
lolololol oh well
Cannot agree 😅 Every new "feature" increases complexity. Why don't you build a helper function for that? Rust's "?", "or_else", "end_then", and so on operators don't make the code easier to read or to understand. But that are different "zen" approaches behind these languages. JavaScript ES3 was simple, ES2021 is not; C++ v2.0 was understandable, C++20 is not. KISS 🤗
@@TJ-wc3iq how am I supposed to build a helper function? All my constructions look like:
res, err := self.ParseSomeStatement()
if err != nil {
return nil, err
}
and yep, doing like
return self.ParseSomeStatement()
isn't my case. I always need to manually check if err != nil. This problem can be potentially solved with a macro system but there is no macro in golang!
Despite the fact simplicity is a kinda advantage of golang, the language really lacks a lot of important and necessary things. And it is sad to see that the go community simply denies the obvious drawbacks. Btw you forgot about DRY principle.
And finally, for me it was a big surprise that it is easier to write clean and short code in Rust which is a systems programming language without GC than in simple go. Thats it
absolutely true, error handling in go is a shit show. for every line of code you need to add at least 3 lines for error handling. thats a overhead of at least 75%.
thats + the inability of go to handle dynamic data structures led me to discard my golang efforts. sadly i actually like Golang.
You could have talked about capturing specific errors. As it is the most confusing part, specially when it comes from outside your project, like a framework.
ayo ur keyboard is funky
return errors.New(text: "error here")
man ( text )getting error
Hey Mr, which IDE are you using ? I think im in love
Goland by JetBrains
Goland is the best!
Dude we need tour of your workstation setup tour, chair table computer.. room..e.t.c. by the way i like your keyboard
Thanks for the idea! Stay tuned!
Kinessis Advantage 2 is the best!!! by the way Advantage 360 will coming out at the end of the year
TAKE MY MONEY
I wish go had try catch ):
C does not have exceptions
error handling in go is a shit show. for every line of code you need to add at least 3 lines for error handling. thats a overhead of at least 75%.
thats + the inability of go to handle dynamic data structures led me to discard my golang efforts. sadly i actually like Golang.
ok that's disgusting way to handle error.. smmh.. this problem is long going problem is go ecosystem and yet the go author dont give a shit about it.. union data type is the way to go