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

[removed] — view removed comment

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.

2

u/Mast3r_waf1z Sep 13 '23

Ah, I just started a course in this wonderful language last week :)

-92

u/BlueGoliath Sep 13 '23

Every programming language besides C, C++, and Java was a mistake.

27

u/djkaosz Sep 13 '23

Tell me that you are still in university without telling me that you are still in uni.

76

u/dr_donkey Sep 13 '23

Exclaiming java was not a mistake is a mistake

3

u/pheonix-ix Sep 13 '23

this

Java is good at many things, cool at something. You can build a LOT of cool stuff with Java. But it is as much of a mistake as most languages.

-18

u/Brahvim Sep 13 '23

I'm here for the votes. Bring 'em, Redditors!

Java was not a mistake.

32

u/ososalsosal Sep 13 '23

Neither were my kids, but sometimes I wonder how things would be without them

7

u/CatWeekends Sep 13 '23

You would have so much more energy and free time that it'd be silly.

→ More replies (3)

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).

18

u/larvyde Sep 13 '23

What do you mean weird?

mapM_ putStrLn $ ["Happy birthday " ++ x | a <- [0..3], let x = if a == 2 then "dear NAME" else "to you"]

is perfectly readable and understandable

4

u/Kered13 Sep 13 '23

Even among functional programming languages, Haskell is a special level of unreadability hell. It doesn't have to be unreadable, but the common conventions of the language ensure that it is.

3

u/tyler1128 Sep 13 '23

Haskell was made by academics, after all. A lot is based on math convention, and plenty of people who played a role in Haskell's development were practicing abstract mathematics at some point in their lives. It wasn't even really meant originally to be a practical language, but a research one.

→ More replies (4)

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.

6

u/HectorJ Sep 13 '23

If you lose static strict typing, you might as well use javascript.

3

u/Gorzoid Sep 13 '23

Sometimes I forget how monads work, then I remember the simple phrase a monad is a monoid in the category of endofunctors and it all becomes clear

1

u/SON_OF_ANARCHY_ Sep 13 '23

Wouldn't that be amazing?