Thanks for this comment. This is EXACTLY what we were talking about
@FastFSharp
Жыл бұрын
"Object Oriented Programming is objectively bad." Okay, I'm in 🤣 I find I have a strange perspective because I'm an F# Native. I started with F# so F# is my native tongue. OO code confuses me so much which is why it was impossible for me to learn C#. I have so many thoughts on this conversation. I'm going to have to write a blog post to address all of them. Great conversation!
@odytrice
Жыл бұрын
I know right 😂. The idea of “Rich domain Objects” has been conclusively discarded by the industry partly because it leads to an untestable mess
@adambickford8720
Жыл бұрын
Ody makes a great point: most 'OO' devs are just writing imperative/structured code that happens to use objects. What most call 'OOP' is more of a mixed paradigm.
@brandonpearman9218
Жыл бұрын
A model is not a perfect representation of reality. A model is just whats useful about reality, it is just the ruleset that applies to your needs. eg a map is not a perfect representation of the earth but it is a model which provides useful information about the earth. The map should display some real things like country names, lat/long, etc.
@Bizmonger
Жыл бұрын
I totally agree. Thanks for sharing.
@adambickford8720
Жыл бұрын
Age absolutely matters. I've been doing oop java for 20 years and functional java/groovy for 10. Devs over 40 don't just struggle w/FP, they actively fight against it. I've had far more success teaching FP to recent grads than vets
@Bizmonger
Жыл бұрын
Makes sense. I've resisted web development for 20 years (with the exception of Silverlight). Functional programming appealed to me because it felt closer to engineering. Hence, composing programs versus writing them.
@pontificous
Жыл бұрын
meh - I have a 53 year old on my team who is my best fsharper, I think its more personality, curiosity and aesthetic. "Enterprise" Java and C# people are a breed unto themselves, but C# is/was what piqued my interest in FP and then when I switched to node and found rambda and saw how much cleaner and testable my code was becoming I never looked back. I'm in management now but I (as a 51 year old) have little patience for people who fight the simple truth that FP > OOP and I came to these convictions in my 40s. I stay away from people who fight beautiful ideas.
@DomainObject
Жыл бұрын
@@pontificous Well put. I’m a an old head that was brought up on OO mainly through C++, Java, and Objective-C… until I grew dissatisfied with the messes I was dealing with on large teams and searched for something more, something better… where I found Clojure, and statically typed FP development in Swift. It just takes someone who is willing to see objective truth to get it. But to your point, the fact that objectively FP > OOP, is an uncomfortable truth that many are unwilling to come to terms with.
@brunoresendesantos45
Жыл бұрын
Fantastic discussion. Congrats!
@herrpez
Жыл бұрын
Very interesting talk! No idea how I ended up here, but I'm glad I did! 😄
@julestburt
Жыл бұрын
Interesting video, thx for sharing, watching from North Vancouver, Canada! I discovered functional programming about 6 years ago (I am an iOS developer) and it blew my mind (conceptually) and then a little time to change my approach to engineering in Functional Swift mainly methodology, largely about limiting functions to pure, and It has made my code so much more legible, smaller, dependable...etc as you know. I can't fathom why others don't want to change, laziness I think sadly! I've been engineering since 1987 (video games) and with some of my functional code...it's kind of like art when I'm done. It's good to find others that get it though...Take care, Jules.
@Majko61
Жыл бұрын
Hey Ody, thanks for explaining and distinguishing between object-oriented programming and object programming. I have never looked at it this way and have always confused object programming with object-oriented programming. I had some prejudices, but now I know it's not so bad. Thanks.
@GeneraluStelaru
Жыл бұрын
Isn't this "object programming" just service oriented procedural programming? You're essentially relying on classes to organize your functions instead of calling them directly.
@bastiat6865
Жыл бұрын
"Standard Screwdrivers are no better than Philipps screwdrivers" No wait. I got that wrong "Screwdrivers are no better than hammers." No. missed it again. "Windows are no better than doorways" Damn. Wait. I'll get this. "Cars are no better than flying cars." That's it right?
@mayy00
6 ай бұрын
I would argue that an os kernel is an object and it manages processes that are also objects as they all have their own state and behavior. Processes in an operating system communicates with each other via messages. This is just reflecting how Alan Kay originally thought of the concept. I don’t believe anyone can design a large system with only functions. At some point, you need to create boundaries around a set of behaviors and assign state to them. How these behaviors organized is a separate discussion. Creating hierarchies with inheritance doesn’t scale well but objects definitely can. Objects and message passing is underrated, primarily because they weren’t understood well. I am saying all these as someone who loves functions.
@sosoga1977
Жыл бұрын
It is no pun intended that Functional programming produces Functional software. We all know what OOP produces, Ody nailed it - Objectively bad software 😉😁
@jboss1073
Жыл бұрын
13:07 - great examples. Another one: if any general purpose language can do everything any other can do, can most languages please "not have null" like Rust and Haskell don't? The answer is no: there is no way to "not have null" in C, C#, Java, Javvascript, etc, therefore not all languages are equally capable just because they are general purpose. Easy.
@DomainObject
Жыл бұрын
Facts.
@c4tubo
Жыл бұрын
Shared mutable state is the default idiom for object-oriented programming, notwithstanding the fact that OO languages CAN be coded in a different way. Moreover, the bigger problem is that the OO frameworks that we are forced to work with embrace this idiom: Android, iOS, most web frameworks, etc. True FP pushes us towards the idiom of passing data and functions as values, not reference objects, discouraging both the mutation and sharing of state. That OO programming can and often does embrace pass-by-immutable-value rather than pass-by-mutating-reference to is pretty much a strawman.
@DomainObject
Жыл бұрын
Well put. Exactly this. Shared mutable state is encouraged in OO languages; and this (along with inheritance) is its main downfall. Sure one could try to write OO code in a way that avoids this, but will the library that you’re integrating with do the same? How about your team members on a large project? Not bloody likely. As Rich Hickey (creator of the Clojure programming language) once said, “it’s not about what your programming language makes possible, it is about what it makes idiomatic”. FP makes writing code that enables local reasoning idiomatic. OO does not.
@eternalskywalker9440
Жыл бұрын
I started writing some code before watching this video. When I went back to the code after, I felt sick, because I had done exactly what you had warned against. The language (Zig) influenced my reasoning in a negative way. I would have written it very differently in an FP language. BTW: McCarthy's 1959 LISP was a start, but compared with modern FP languages, it was pretty scary. Scheme's lexical scope fixed the worst of it. Standard ML's type system was another leap forward. (Yes, calling Scheme and ML "modern" is stretching things, but those two innovations are critical.)
@thamahanekheele6460
Жыл бұрын
You are better with Zig. Stick with it and you won't regret later.
@originuk
Жыл бұрын
Loved this analysis and exchange of words! Bizmonger is part of the "big brain" camp. My brain is very small. If a design, software, operations, tests etc fit inside my brain, then it works. If there's too much abstraction / obstruction / obfuscation in the intent of how to solve a problem, it won't fit in my head, and it's very likely the problem could be solved in a much simpler way. Over-engineering , purism, pragmatism, simplicity, performance, statefulness and complexity are all important. It's crucial to understand that "everyone should know about" the obscure nuances of coding makes it harder for coders who think differently when following though the code. It's probably best to accept that everyone has some kind of experience, knowledge, wisdom .... or not. Ody's perspectives feel more honest, experienced and genuine. Well done guys. Dave's been really brave to lay down the gauntlet and express his opinions based upon his previous experience.
@Bizmonger
Жыл бұрын
Thanks for sharing, @originuk. Given what you stated, we have a future episode in which we compare software development to the game of chess.
@techconception
Жыл бұрын
@orginUK, we read your comment on our recent Chess and Software episode.
@kosnowman
Жыл бұрын
great stuff, subscribing for sure
@piotrc966
Жыл бұрын
If functional programming were better, things like Linux, operating systems, databases, browsers, games would be written functionally. But they aren't. They are imperative and often object-oriented. Functional software may be cheaper to write and maintain, just as python code is cheaper than c++. But they are not better in terms of speed and memory consumption.
@techconception
Жыл бұрын
Fair point. The unspoken context is for writing business applications. What do you think about the Rust programming language and it'sFP support?
@thamahanekheele6460
Жыл бұрын
@@techconception That's what most FP programmers don't see. They tell you speed doesn't matter because servers are fast. that's totally wrong. Big companies like Google, Amazon, Facebook, replace these functional languages because they are too EXPENSIVE to run on servers. A server running many requests per seconds costs millions to run. Those CPUs/GPUs use a LOT of electricity. So adding more hardware to server infrastructure is damn expensive. Using faster languages makes it possible to use less hardware which makes costs much more cheaper. I have heard many biases in this video.
@DomainObject
Жыл бұрын
Absolute nonsense. Do you know how many server side applications are based on Java and the Java Virtual Machine (JVM)?? Please compare that stack’s performance to that of Haskell. I’ll wait. You’d be surprised at the result. So FP doesn’t automatically mean slow. OR how about Rust written in a functional style? Yes there are areas of any program that are performance sensitive that require a more imperative approach. But that is not the whole program. The smart money is on FP for most of the code and drop down to imperative when required.
@piotrc966
Жыл бұрын
@@DomainObject "Do you know how many.... " Less than python. And so what. you'll convince me if you show me an operating system written functionally, or a browser, or even a game engine, and it will run faster and consume less resources than is imperative. For over 10 years, the power of processors has been growing very slowly, more by adding cores and increasing their price and power consumption than by developing manufacturing technology. Same with memory.
@ArkhKGB
Жыл бұрын
18:05 no need to write some multithreaded system. Well, you have the same kind of model with php. Just sayin'
@thamahanekheele6460
Жыл бұрын
I was very amused when I heard that statement.
@evandrofilipe1526
Жыл бұрын
Listening to this while writing rust
@stagnudemorte9191
Жыл бұрын
the explanation of OOP given by Ody does resemble so legacy code i worked on years ago, but i've never thought of that as actual OOP. the definition i've always seen is that OOP is programing with a focus on data, where objects contain logic and data. iirc there were 4 things in the box, abstraction, inheritance, polymorphism, and encapsulation. idk, what this manager, sub manager thing is. i'm not very far in yet, i'm going to keep watching.
@stagnudemorte9191
Жыл бұрын
replying to myself so as not to clutter. at the 47 minute mark and i feel like the resistance to calling the 4 ideas that are associated with OOP part of OOP and not just part of general programming, i think, is the point of the video where farley said that they were both tools.
@torarinvik4920
Жыл бұрын
I actually like OOP(Object programming as Ody calls it), however what I love so much about F# is how easy it is to split functions and modules into smaller ones. With the module system I find that I very often don't need the classes because Im getting the modularity I need from the module system. I can use public and private to hide whatever I want to and choose what scopes can have access to it. I can have one function that has 10 local helper functions with very little code on the screen and it is easy to read!
@АнимусАнанимус
10 ай бұрын
What you say about concurrency is possible to say shorter: Better asymptotics does not mean better performance.
@bastiat6865
Жыл бұрын
Q; what's a semiphore? A: Carrying cargo from port to inland.
@guillaumedechambre9138
Жыл бұрын
Well done guys, great content. Thank you for your contribution.
@hughmanwho
Жыл бұрын
So if measuring the percent of commits that are bug fixes doesn't tell you about the productivity, then what is a good measurement? Can you come up with one?
@techconception
Жыл бұрын
Productivity should be measured by number of tickets closed or features released in a window of time say a sprint. The amount of Code/Commits in itself is not even good representation of effort as a single line change could take days to figure out whereas multiple commits might take a few minutes to crank out
@thamahanekheele6460
Жыл бұрын
Ody is wrong. OOP was designed for message passing. So Inheritance and other things were added features.
@lepidoptera9337
Жыл бұрын
That is incorrect. Historically OOP was designed to give compilers a chance to automate code reuse. The message passing implementation has nothing to do with OOP.. It also doesn't make OOP better. Message passing is inherently unsafe and has horrible performance.
@c4tubo
Жыл бұрын
The "each type of programming is just a different tool, each of which is ideal for certain situations" argument is getting tiresome, and it is way off. Comparing them to hammers and screwdrivers is a terrible metaphor because using a hammer or screwdriver does not change the way that you think about what you are doing. Programming in a different paradigm, language, or idiom radically changes how you think in proportion to how different it is.
@PassiveSmoking
Жыл бұрын
I wish this whole holy war over what's "better" in software engineering would just stop. There's no such thing as "better", there's only "better suited to the task at hand". There are some use cases where OOP suits better than FP does, and some cases where it doesn't. Pick the right tool for the job, don't try to form the job around your tool.
@thamahanekheele6460
Жыл бұрын
Sometimes people make things a religion. It's like being stuck.
@lepidoptera9337
Жыл бұрын
Neither OOP or FP are good tools. People need to get a life and move on.
@mpweiher
Жыл бұрын
Your "definition" of object-oriented programming is comically wrong.
@dupersuper1000
Жыл бұрын
What did you find to be wrong? And how would you define OOP?
@thamahanekheele6460
Жыл бұрын
Very very very wrong
@mpweiher
Жыл бұрын
@@thamahanekheele6460 Well yes, comically wrong :-)
@DomainObject
Жыл бұрын
@@mpweiher Please provide your definition so that we can compare and contrast.
Пікірлер: 56