21 points

I misread Exceptioncatcher as Exceptionhatcher and I think it still fits

permalink
report
reply
5 points

I believe the lifecycle goes ExceptionLayer, ExceptionIncubator, ExceptionHatcher

It’s critical you don’t throw your exceptions too early, they need to learn to fly first 🤣

permalink
report
parent
reply
2 points

I thought that’s why you throw them?

permalink
report
parent
reply
18 points

functional programming ftw

permalink
report
reply
24 points

Functional Programming Theory: 500 pages of lambda calculus and endofunctors

Functional Programming Practice: Quicksort

permalink
report
parent
reply
8 points

There’s plenty of real world code written in functional languages. Also, this idea that FP is somehow more complex is complete nonsense. Lisp family are some of the easiest languages to learn.

permalink
report
parent
reply
10 points

Functional programming is perfect for all my projects that I don’t start!

permalink
report
parent
reply
6 points

Been working in Clojure for over a decade now, and would never never go back to using imperative/OOP at this point.

permalink
report
parent
reply
3 points

TBH Rust is pretty nice, it borrows (pun intended) a lot of ideas from the functional world (algebraic data types, traits, closures, affine types to an extent, composition over inheritance, and the general vibe of type-driven development), but it’s much easier to write fast, efficient code, integrate with decades of libraries in imperative languages, and the ecosystem somehow feels mature already.

permalink
report
parent
reply
2 points

Rust solves a specific problem, and it’s good at letting you write correct programs with low resource usage. It’s definitely a huge improvement on C and C++.

That said, I find a language like Clojure is far more productive because it’s more expressive, and development is done interactively. With Clojure, you start up your program, connect the editor to it, and evaluate code as you go seeing changes live. Once you’ve worked this way, it’s really hard to go back to having to compile your whole program each time you want to see what it’s doing. It’s like having a conversation with the compiler. It makes it very easy to experiment with different ways to solve a problem, and it gives a lot of confidence because you always see exactly what the code is doing. Clojure also interops with JVM and Js runtimes, so those entire ecosystems are available for use.

Incidentally, there’s a Lisp style language that embraces a lot of Rust principles. https://github.com/carp-lang/Carp

permalink
report
parent
reply
5 points

You can’t spell “functional programming” without “fun”.

permalink
report
parent
reply
1 point

Would you make a game with functional programming? Or anything with a GUI?

permalink
report
parent
reply
3 points

Lots of things with a GUI, but games are better left for ECS.

permalink
report
parent
reply
1 point

Ok. I just read the wiki and it’s interesting. What’s a good resource for learning deeper about ECS?

permalink
report
parent
reply
3 points

Sure yeah, I’ve done lots of UI programming with Clojure. It works great. I’ve also made small games. Why do you think it would be more difficult than with imperative style?

permalink
report
parent
reply
13 points

Repeat after me: public static void main(String[] args)

permalink
report
reply
9 points
*

blasphemy!

void main(int argc, char ** argv, char ** envp)
permalink
report
parent
reply
3 points
public static void main(String[] args)
public static void main(String[] args)
public static void main(String[] args)

Am I summoning the flying spaghetti monster?

permalink
report
parent
reply
2 points

I’m sorry, but the only spaghetti you get is a 17 levels deep if clause.

permalink
report
parent
reply
2 points

The object man appears behind you while you’re coding and inserts a null reference that takes you a day to find.

permalink
report
parent
reply
13 points

I guess you could call this an OOPsie

permalink
report
reply
2 points

😆

permalink
report
parent
reply
1 point

Nice

permalink
report
parent
reply
8 points

Feeling attacked with Leggable and Fleable. I’ve been known to write a concern or two in Ruby on Rails but what can I say? I like my code DRY.

permalink
report
reply
3 points

My biggest problem with it is that those aren’t verbs. You might have LegCount -> Countable and FleaCount -> Countable though.

permalink
report
parent
reply
1 point

Yeah, that’s pretty annoying.

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 5.4K

    Monthly active users

  • 886

    Posts

  • 9K

    Comments

Community moderators