Ask me a question about something you think I wouldn’t be too interested in
-
Show this thread
-
Replying to @visakanv
Which is better, functional or object-oriented programming languages?
2 replies 0 retweets 1 like -
Replying to @_molten_steel_
obviously neither is universally better, or the question wouldn't exist so it depends on what you're trying to do and what your needs are, and even maybe what your personality is I would probably generally learn towards OOP myself given my personality and approach to things
1 reply 0 retweets 3 likes -
Replying to @visakanv @_molten_steel_
OOP is actually terrible though which is why we use it for most things
1 reply 0 retweets 11 likes -
i have seen so much awful OOP code, studiously avoiding its strengths while diving headfirst into its weaknesses, that i understand why people believe this but i have seen good OOP code and it is very, very good indeed
3 replies 0 retweets 7 likes -
I'm half-kidding. My experience has been similar. There are some problem domains that are neatly divided into object classes and the inheritance model is a massive efficiency gain. Functional Composition can accomplish the same thing but few languages have syntax sugar for it
2 replies 0 retweets 2 likes -
Replying to @danlistensto @chaosprime and
the biggest source of OOP fuckups, ime, are "verb classes". You can tell by the name that you've got an abstraction leak. If you ever find one with a name that is some form of "ThingDoer" watch out.
1 reply 0 retweets 3 likes
that's incredibly close to the kind of thing i was thinking of, my half-formed comment was something like "did you know it's possible for objects to be the reference points for operations on them instead of having to remember there's some damn utility class out there somewhere"
-
-
the other rule of thumb is if you struggle to think of a scenario where you would ever have more than a single instance of a class at a time you don't really have a class, you just have a procedure that takes a hashmap as an argument.
0 replies 0 retweets 3 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.