fixed (2)_rule_final draft 3

213 points · 28 comments · view on lemmy.world

28 Comments

Bishma@discuss.tchncs.de · 43 pts · 2y (3 replies)

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

mokus@lemmy.blahaj.zone · 21 pts · 2y

There there, the monads can’t hurt you here

zewu@lemmy.world · 15 pts · 2y

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

match@pawb.social · 5 pts · 2y

A distant voice:

Learn you a Haskell for great good

saigot@lemmy.ca · 32 pts · 2y (2 replies)

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

damnfinecoffee@lemmy.world · 3 pts · 2y

I prefer to newline after every symbol for better readability

crazybrain@lemmy.spacestation14.com · 2 pts · 2y

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

ambrosiaforest@lemmy.blahaj.zone · 28 pts · 2y (2 replies)

python user 😔

MashedTech@lemmy.world · 4 pts · 2y

Let me explain...

yetAnotherUser@lemmy.ca · 2 pts · 2y

Imagine having to use {}; instead of

9point6@lemmy.world · 26 pts · 2y

OP is clearly a python user incapable of understanding punctuation

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

Wilzax@lemmy.world · 22 pts · 2y (1 reply)

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

zoly@lemmy.world · 6 pts · 2y

The only correct answer

wreckedcarzz@lemmy.world · 17 pts · 2y (6 replies)

Allman or gnu, rest are fucking bonkers

Metype@lemmy.world · 16 pts · 2y (2 replies)

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@lemmy.world · 6 pts · 2y

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

doctorcrimson@lemmy.today · 4 pts · 2y
[ removed ]
drbluefall@toast.ooo · 15 pts · 2y (1 reply)

K&R FTW

perishthethought@lemm.ee · 3 pts · 2y

Obviously!

state_electrician@discuss.tchncs.de · 9 pts · 2y

Lol, you deranged lunatic.

kryptonianCodeMonkey@lemmy.world · 14 pts · 2y (2 replies)

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

zea_64@lemmy.blahaj.zone · 13 pts · 2y (1 reply)

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.

JDubbleu@programming.dev · 6 pts · 2y

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.

ZILtoid1991@kbin.social · 4 pts · 2y (1 reply)

OTBS is the only way!

pewgar_seemsimandroid@lemmy.blahaj.zone · 3 pts · 2y

no, stealing code is

insomniac_lemon@kbin.social · 4 pts · 2y (3 replies)

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

ReveredOxygen@sh.itjust.works · 2 pts · 2y (2 replies)

Nim?

insomniac_lemon@kbin.social · 2 pts · 2y (1 reply)

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.

ReveredOxygen@sh.itjust.works · 1 pts · 2y

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