Permanently Deleted

  • space_comrade [he/him]
    ·
    edit-2
    4 years ago

    oop doesn’t encapsulate real world objects, it encapsulates data and implementation that concerns that data. it allows programs to be built up of messages passed between these structures, which can be coordinated flexibly with late binding.

    This is not how OOP generally gets taught, also this encapsulation tends to become more trouble than it's worth in the long run.

    but, in general, fairly dogmatic FP is entirely unsuitable for most software development today.

    I agree, and I think Rust struck a good balance there. I just wish the ecosystem was better, also perhaps an opt-in GC for Rust for when you don't really care about performance that much.

      • space_comrade [he/him]
        ·
        edit-2
        4 years ago

        I dunno I think strictly tying data to particular code is in general not good.

        In my experience it doesn't facilitate good code at all, in fact it often does the exact opposite when an inexperienced dev discovers inheritance. I've seen in production code really ridiculous stuff like 2DChart inheriting 2DPoint and weird shit like that or you have some monster IGodInterface with a bunch of methods having blank implementations for most concrete implementations.

        Personally I've found once you get the hang of it a functional-first approach makes it way easier to do with the data what you want done without contorting your brain to fit an OOP model. You just do the stuff you want with the data, you don't have to think too hard where you'll put the data and where you'll put the code that churns the data.