6
vane
5y

Method passing as argument.

Fuck you who are doing that.

FUCK YOU !!!!

Use fucking STATIC !!!!!!!!

Comments
  • 11
    Ah yes the tears of non functional programmers
  • 4
    That's bearable. Command pattern I think?
    I've seen someone cache *methods* in redis! Well THAT I could not cope with.
  • 4
    Callbacks?
  • 2
    Suddenly function pointers
  • 1
    @tekashi the tears of mangling code.
    I don’t have problem when you can’t do it or or it’s dumb ex add event listener but I always prefer to pass object instead of passing functions from different files just to invoke them especially without fucking arguments.

    I can eat steak using my bare hands so why the fuck no one is doing it ?

    Who would remember what that shitty code do a year from now ?
    Where is logic of doing it except I just make it work here and now and I don’t care what will happen after that. Give me likes and let others fix my shitty code that introduced bugs that’s what I can see right now.

    After bug introduced rewrite it 10 times because I don’t remember what the fuck I did yesterday.

    Fuck this.
  • 3
    @vane again, if you havent used any semi-functional approach, i cant really explain to you how is passing functions a good thing
  • 3
    How are your unit tests working with all those static calls?
  • 0
    @vane I feel so ashamed because I did this at my previous job for 2 years and since I was the only developer I got away with it.
  • 1
    @k0pernikus you don’t for me static is a shortcut of “I don’t know where to put it but I don’t want to shit fuck code so maybe later I will place it in correct place or let someone smarter do it for me”.
  • 1
    Static is really a worst case scenario and breaks with most architecture patterns. The callback pattern might be ugly at times but at least follows basic architectural rules and gives you a hint what will be done next. If you use static fields in OOP you are most definitely do something wrong.
  • 0
    In oop maybe but this is common in functional programming.
Add Comment