Why is Go syntax so messy

urska@lemmy.ca to Programming@programming.dev – 24 points –

I understand Rust being type safe, but Im seeing syntax that Ive never seen in my life in Go which looks too messy

var test int < bruh what?

:=

func(u User) hi () { ... } Where is the return type and why calling this fct doesnt require passing the u parameter but rather u.hi().

map := map[string] int {} < wtf

22

You are viewing a single comment

@thingsiplay @urska
':=' goes back to Pascal and maybe further. It also appears in PL/SQL. When I was learning to code my teacher told me to pronounce it as "becomes" since "equals" was for comparison.

Took me a while to get used to the C style '=='.

1 more...