this post was submitted on 10 Feb 2024
213 points (96.1% liked)

196

16484 readers
1668 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
213
submitted 9 months ago* (last edited 9 months ago) by Feathercrown to c/[email protected]
 
all 29 comments
sorted by: hot top controversial new old
[–] [email protected] 43 points 9 months ago (3 children)

Nope, Haskell was just a bad dream I had. It was just a dream, not real, that's not real. I'm OK.

[–] [email protected] 21 points 9 months ago

There there, the monads can’t hurt you here

[–] zewu 15 points 9 months ago

Haskell is nice. This code style... not so much

[–] [email protected] 5 points 9 months ago

A distant voice:

Learn you a Haskell for great good

[–] [email protected] 32 points 9 months ago (2 children)

If all your code isn't on one line you aren't a real programmer.

[–] damnfinecoffee 3 points 9 months ago

I prefer to newline after every symbol for better readability

[–] [email protected] 2 points 9 months ago

I wonder if you could have it all on one column.

[–] [email protected] 28 points 9 months ago (2 children)
[–] MashedTech 4 points 9 months ago

Let me explain...

[–] [email protected] 2 points 9 months ago

Imagine having to use {}; instead of

[–] 9point6 26 points 9 months ago* (last edited 9 months ago)

OP is clearly a python user incapable of understanding punctuation

Embrace the brace, you won't be alone with a semi-colon(...e)

[–] Wilzax 22 points 9 months ago (1 children)

Kernighan & Ritchie. This is the hill I choose to die on.

[–] zoly 6 points 9 months ago

The only correct answer

[–] wreckedcarzz 17 points 9 months ago (3 children)

Allman or gnu, rest are fucking bonkers

[–] Metype 16 points 9 months ago (2 children)

Putting the opening curly brace of a code block on the same line that defines the conditions the code block will run under is bonkers?

[–] jwelch55 6 points 9 months ago

There's an asymmetry to it that always left me uncomfortable.

[–] [email protected] 15 points 9 months ago (1 children)
[–] [email protected] 3 points 9 months ago
[–] [email protected] 9 points 9 months ago* (last edited 9 months ago)

Lol, you deranged lunatic.

[–] kryptonianCodeMonkey 14 points 9 months ago* (last edited 9 months ago) (1 children)

Reject the code block. Embrace the modularity. If you were going to write a code block, write a function instead.

[–] [email protected] 13 points 9 months ago (1 children)

If you must avoid code blocks, that means you can only use one line. I don't think you can be Turing complete if each function can only call one function. I don't even think you can get a context-free grammar, Chomsky normal form at least allows a variable to expand into two variables.

[–] [email protected] 6 points 9 months ago

Please never bring up CNF again. I'm a year out of college, two years out of finite automata, and I still shudder when it's brought up.

[–] [email protected] 4 points 9 months ago (1 children)
[–] [email protected] 3 points 9 months ago

no, stealing code is

[–] [email protected] 4 points 9 months ago* (last edited 9 months ago) (1 children)

I might have a personality disorder, but yeah seeing most code/languages (stuff more substantial than the image here) makes me think there's something really wrong with them or me (or both) because I don't see how you get into that. Though I know in many cases it probably could've been written differently.

I like 1 language*, but it uses whitespace. I mean that's not the defining factor, but there aren't really different styles like this (though there is spaces for indentation depth, and I usually went with 1 space instead of the standard 2 so there is that).

*=it's somewhat niche and I never really started with it because... userspace reasons I guess is the best way to put it

[–] [email protected] 2 points 9 months ago (1 children)
[–] [email protected] 2 points 9 months ago* (last edited 9 months ago) (1 children)

You got it. (mirror link)

I'm not sure if you guessed it or not because I've posted about it a few times in different contexts (thus why I try not to name drop now). I mean much of it is on me as well, change a few things about me and I might've done more with it.

[–] [email protected] 1 points 9 months ago

Nah, it's just the only language I know with Python syntax, other than Python