this post was submitted on 23 Feb 2024
10 points (100.0% liked)

pissposting

1469 readers
1 users here now

Piss tier memes, lower than shitposts. Brain damaging stuff.

founded 2 years ago
MODERATORS
 
top 13 comments
sorted by: hot top controversial new old
[–] green_square@yiffit.net 2 points 2 years ago (2 children)

Can we all agree haskell style is a mental disorder?

[–] street_pigeons@lemmy.world 1 points 2 years ago (1 children)

I think it's trying to keep track of all the semicolons but my god does it look strange

[–] littletranspunk@lemmus.org 2 points 2 years ago (1 children)

I might just do that style just to make my professor cringe on my next c# assignment

"I mean, it's right, it runs, but it looks like shit"

[–] surewhynotlem@lemmy.world 1 points 2 years ago (1 children)
[–] littletranspunk@lemmus.org 1 points 2 years ago

It's a competition? Damn, that's wild XD

[–] frontporchtreat@lemmy.ca 1 points 2 years ago* (last edited 2 years ago) (1 children)

One of the benefits of the haskell style is easy commenting of the additional functions. I do something similar in my python scripts when testing several differnent chunks of code.

But then again I chose a career in GIS so I probably have a mental disorder.

[–] Sweetpeaches69@lemmy.world 1 points 1 year ago

As someone who works with, and sometimes on GIS, but not solely on GIS, I can confirm your last sentence. Godspeed.

[–] Subverb@lemmy.world 2 points 2 years ago
[–] caseyweederman@lemmy.ca 1 points 2 years ago

I went from not being able to tell the difference to being deeply disturbed by everything in the red

[–] perviouslyiner@lemmy.world 1 points 2 years ago

Perl style: all on one line, with the 'while' statement at the end.

[–] janAkali@lemmy.one 1 points 2 years ago* (last edited 2 years ago)

Ew. I usually don't use curly braced languages. But whenever I need to define collections on multiple lines I always put opening bracket on the end of the line and closing bracket on the same indent level as the start of the statement:

let hello = [
  "Hello, there!",
]
var
  a = true
  arr = [
    "line 1",
    "line 2",
  ]
[–] Cerise_W@lemmy.world 0 points 2 years ago (1 children)

Can we talk about variable scope? Is x changing inside a called function without so much as a pointer being passed?

[–] Deuces@lemmy.world 2 points 2 years ago

Avoiding global variables is just something dumb people do to protect themselves. Real programmers declare every variable before Main.