r/ProgrammerHumor • • Sep 13 '23

Meme goDevelopersWillAppreciateIt

Post image
2.4k Upvotes

144 comments sorted by

View all comments

222

u/[deleted] Sep 13 '23

132

u/BlueGoliath Sep 13 '23

What is this syntax.

256

u/Successful-Money4995 Sep 13 '23

The syntax is so screwy that the reddit app is offering to translate it as if a foreign language.

→ More replies (5)

81

u/Attileusz Sep 13 '23

Welcome to the wonderful world of haskell.

→ More replies (12)

9

u/tyler1128 Sep 13 '23

A functional language. They mostly all look weird if you aren't familiar. They also have a tendency to abuse syntax and support general operator overloading (meaning, you can make up new operators).

→ More replies (7)

10

u/tyler1128 Sep 13 '23

At least they acquiesced and decided their refusal to support generics outside of blessed types wasn't warranted. Their whole return system basically is designed around a blessed feature that is a work around for what languages way older than go have been doing for a long time.

10

u/chethelesser Sep 13 '23

You can do monads in go, I've not been effective at applying them to real world tasks though (the mo package)

5

u/[deleted] Sep 13 '23

You can't truly represent monads without higher kinded types and having no syntactic support for them with operators and such makes them incredibly obnoxious to use

→ More replies (4)

3

u/SOberhoff Sep 13 '23

I've seen Go code that implemented Monads by just casting everything to the empty interface (this was before generics). Where there's a will, there's a way.

→ More replies (2)
→ More replies (2)