Go language

What is your honest opinion about the GO language?

Attached: shittypet.jpg (251x201, 7.15K)

Other urls found in this thread:

stackoverflow.com/questions/6996704/how-to-check-variable-type-at-runtime-in-go-language
go.dev/doc/effective_go#interface_conversions
go.dev/doc/effective_go#type_switch
github.com/peteblank/directory2todolist/blob/main/test.go
raw.githubusercontent.com/peteblank/directory2todolist/main/output.json
twitter.com/NSFWRedditImage

Slower Rust, no generics, slowly dying

Too many threads about it.

no nonsense backend language, i learnt how to read golang in a month

>slower Rust, every non-retarded still opts to use go over Rust for some reason

I'd learn it for a job but I don't have anything I need to create with it right now.

It is weird
Like the for loop doesnt have parenthesis, you dont need to even declare variables and it doesnt demand you use semicolons.
Its like some thing they just whipped up for the sole purpose of making APIs

A language made by retards. I don't get why there are interfaces and structs if interfaces are just pointers to structs, so what is the point of interfaces then? And if the point of interfaces is to user late-binding why we can't overload a fucking interface?

wtf is with the daily golang threads?
is the google ai data mining our opinions so it can fix go?

Im trying to find a way to check if a value is a certain type.
Something that is trivial in other programming languages. But there is nothing on google on how to do it.
I might drop thus turd and just do what i was going to do in javascript.

reflect.TypeOf

be careful though. I've done stuff like that in Go before and it becomes a mess very quickly.

>is the google ai data mining our opinions so it can fix go?
Lol they have access to the entire internet, if they wanted to do that

stackoverflow.com/questions/6996704/how-to-check-variable-type-at-runtime-in-go-language

Do you even google?

Well yeah but then i type
if reflect.TypeOf(variable)=="string"
And it doesnt work

>Im trying to find a way to check if a value is a certain type
Show code example

if reflect.TypeOf(variable).Kind() == reflect.String

Though just use type switches if you can.

TypeOf returns a Type, not a String

I think this guy has it right

thanks ... apparently my json has no strings though ugh

Uhh that's weird, do you have an example JSON and code?

go.dev/doc/effective_go#interface_conversions
go.dev/doc/effective_go#type_switch

That single page is enough to prepare anyone to start with Go. I wish everyone would just read it once when starting to write the code, because it pretty much covers everything about the language, and answers most of the topics/questions posted here. My first experience with Go was frustration, before I got into reasoning why everything is the way it is, and I realized that it's way more intuitive than I initially thought.

sure here is the thing I last uploaded
for the go code:
github.com/peteblank/directory2todolist/blob/main/test.go
for the json:
raw.githubusercontent.com/peteblank/directory2todolist/main/output.json
I'm trying to get it to print result: with each individual key. It kind of does but then when it gets to the second nested thing it prints the whole thing. I don't know how to explain it...