Functional OOP????? | Prime Reacts

preview_player
Показать описание
Recorded live on twitch, GET IN

MY MAIN YT CHANNEL: Has well edited engineering videos

Discord
Рекомендации по теме
Комментарии
Автор

This is how chaotic evil programmers write code

figloalds
Автор

Feels like _a lot_ of effort to just do something you can do better and more easily.

Wolfeur
Автор

Dude saw a wheel and said "I could do a better job" and added corners. Stop reinventing the wheel, your square wheel is not better! 😂

TJPedenTheBeard
Автор

My entire OOP experience. Hours of philosophy to create code that doesn't make sense w/o that philosophy and blows up on a simple structural change due to all the coupling.

adambickford
Автор

Sounds like a 'junior' trying to over-engineer something and they end up with a mess, also being very opinionated about it

mihai-gabriel-
Автор

Oh my gosh ...if I were a jr programmer at Netflix I would be so nervous whenever Prime is reviewing my code. 😂

weiSane
Автор

The origins of object-oriented programming (OOP) can be traced back to the development of the Simula programming language in the 1960s by Ole-Johan Dahl and Kristen Nygaard at the Norwegian Computing Center. Simula was originally designed for simulating real-world systems, and it introduced the concepts of classes and objects, which are now fundamental to modern OOP languages.

Simula's innovations in OOP inspired the development of other programming languages, such as Smalltalk. It's annoying when some people wrongly cite the history of OOP, then proceed to be is super opiniated it.

dthe
Автор

Imagine a function that I could pass any array of grades in. One student or the whole school, the function wouldn’t care. It would just return the best grade of the input set.

Now wouldn’t THAT be cool 🤔

sleepiboi
Автор

I got out of bed at 5am to keep programming cause I couldn't sleep and this is going to be good entertainment

redlancer
Автор

Just found your channel recently and I didn't know just how much I needed an angry developer to aggressively afirm me

ryangrogan
Автор

I think the author of the article missed the chapter on prototypes, prototype chains, and prototypal inheritance in JavaScript. Oddly enough, that's one of the main things that differentiates JavaScript from other languages.

richardgeddes
Автор

This looks kinda' similar to how objects are implemented in the Structure and Interpretation of Computer Programs video lecture series.

I guess the point of the article was to teach how you can build a thing which behaves like built-in objects using simpler parts—ignoring the fact that what you have created is a monster. That is, the point was not to teach a programming technique but to transmit a conceptual understanding.

For comparison: I could roll my own vtables in C if I needed them. I hope I won't need them, but I really like knowing how to. This article might have expanded someone's mind the same way my mind was expanded when I understood that.

With that in mind, I don't find the article objectionable.

jonaskoelker
Автор

It's clear from the last paragraph that he's not recommending that code style. It's designed that way to DEMONSTRATE what message passing is. He should have brought it back to idiomatic JS and pointed out where the message passing happens.

LoveLearnShareGrow
Автор

This whole article was edging me. I was excited for them to say "look! This is just partial application! And it's a really powerful model when combined with immutability, and a syntax to support it!". Then there was the conclusion and now I'm blue balled.

fletchcanny
Автор

Prime is too optimistic. I knew this wasn’t going to end well when we started returning different functions based on a switch statement.

omega_sine
Автор

The argument for FP has never been speed. Fans of FP tend to believe that their programs tend to be more correct. Hard to measure, so who really knows. I do think that there are lessons to be learned from that world, that will improve your programs, regardless of language or paradigm.
Also, Rust is the only language that I know of that takes correctness seriously without going full FP.

EDIT: The example in the article has nothing to do with anything that the hard core FP people are talking about though. Creating class-like functions with internal state is literally just a less readable way to write OOP.

marcusrehn
Автор

The article should've been titled: "How to fuck up the Actor model side-ways. Getting all the cons without any pros"

bahaelaila
Автор

I love how one of the first paragraphs is "we need to understand what is message" and then doesn't explain it. 😂

PetrSzturc
Автор

This is brilliant!
If i ever get pissed off with my employer i'll push this through - refactor all the code to match that pattern and then just quit.

Chrrs
Автор

bro literally took the class functions and made them being called with a magic string . OMFG

jyrikgauldurson