News for hackers. Stuff that matters.
Re:JavaScript Is Weird by jakelazaroff on Sunday August 13, 2023 @03:10PM (#37113168)
I really like Go, and I tend to prefer it to JS for server-side stuff, but when I use it there are a lot of things I miss about JS:

- Error handling is onerous; I write a lot of functions where most of the lines are just checking for and returning `err`

- No anonymous structs, and it’s really awkward to define structs inline

- Dealing with collections is really verbose; I guess since generics dropped I could handle this in userland, but it’s not idiomatic

etc etc. No language is perfect!

Re:JavaScript Is Weird by andrewfromx on Sunday August 13, 2023 @05:12PM (#37114555)
I think u might like my "go on rails" framework:

https://many.pw/sd/

I make heavy use of map[string]any vs structs. I also find the right balance of checking err vs just making it _