24
Why is Go syntax so messy
(lemmy.ca)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Yea this is just syntax, every language does it a little different, most popular languages seem to derive off of C in some capacity. Some do it more different than others, and some are unholy conglomerations of unrelated languages that somehow works. Instead of saying why is this different, just ask how does this work. It's made my life a lot simpler.
var test int
is justint test
in another language.func (u User) hi () { ... }
is justclass User { void hi() { ... } }
in another language (you can guess which language I'm referencing I bet).map := map[string]int {}
is justMap<String, Integer> map = new HashMap<>()
in another (yes it's java).Also RTFM, this is all explained, just different!
Edit: I also know this is a very reductive view of things and there are larger differences, I was mostly approaching this from a newer developers understanding of things and just "getting it to work".