Комментарии:
Just saying. I have seen good OOP codebases, I have not seen good funtional codebases. I am open to examples of a big project that is functional.
Also, functional easy to test? Yeah, because you are testing CODE, not businesss rules.
OOP is easier to test, but I must admit, everyone is doing it wrong. We teach TDD wrong. We teach it with simple classes, which makes us think we should test on the level of functions or classes. But instead, we should test modules. That would be the right level to test at. You learn this by actually writing the test FIRST <- no excuses, just do it. So 1) Red 2) Green 3) refactor. Here are two simple question you can ask to see if you are doing it right:
1) Did I touch the production code without a failing test?
2) If I refactor any of my code, do I also need to rewrite the test? (Of course I don't mean adding a parameter to a method signature here, but anything else does count)
If you answer yes to either of these you are doing it wrong.
I'm still spamming Patrick with a thank you message
ОтветитьCool.
Ответитьwe need more vides like this in 2023
ОтветитьI think a good developer should learn and at least try all of these paradigms. Learning functional programming can make you a better OO programmer. Learning OO concepts will help you know when to break functional rules.
Personally, I like OOP with inheritance so I can make a standard base class that my junior devs can extend, but put some enforcements in place that you'd have to go out of your way to mess them up. I could probably use some practice with composition, I can see sprinkling some mixins on a few classes.
Thank you for being so clear and easy to understand programming it’s a great series tutorials that you have I don’t watch anyone else anymore
ОтветитьIs this an AI generated video ???
ОтветитьWhy everyone is saying "blue print" and not saying what a blue print actually is!
Ответить4 years ago you sounded super weird
ОтветитьThanks
ОтветитьThe advantage of the functional cake is that when you’ve finished making the cake, you still have all the ingredients. The advantage of the OO cake is that you can digest it.
Ответитьthis was pretty hard to follow and i know the basics of both paradigms
ОтветитьThe irony here is that some of these concepts could be a bit difficult to understand at first but the one FACT in this video that still brings people to a complete standstill is, It's GIF, not JIF.
Ответитьwill composition like this be natively available on JS or TS without that ugly boilerplate anytime soon?
Great video :D
Starts with a G-ee it's pronounced jiffff!!!!
ОтветитьThis is not a complete story of functional programming. Currying has not been touched on. Not functional composition. Why anyone would want to do functional TS is beyond me.
ОтветитьTHIS const addEmoji = (val) => val.toString() + " 😀" , NOT const addEmoji = (val) => toString(val) + " 😀"
ОтветитьWhy is this video so good 💚 and why are the answers to all of the opening questions just "both".
ОтветитьI've only ever used OOP with languages like C++ and Python so the functional programming way of doing things was quite interesting to see. I'll have to try some F# code and make some simple stuff to try it out.
ОтветитьGreat video
ОтветитьWhat extension did you use to show the “console.log” result on the right side?
Ответитьman your videos like fast food.. but one additional thing they are very healthy <3
ОтветитьNah nah nah sorry bro I learn everything from you but you’re wrong on the GIF vs Jif 😂 It is pronounced exactly the same as the peanut butter brand Jif. The creator of GIF Steve Wilhite HIMself has attested that the name came from Jif’s old slogan “choosy mothers choose Jif”. His catch phrase was “choosy developers choose GIF”, thus the pronunciation is the same. We can’t just go around telling ppl how to pronounce their names just because their name may not fit the conventional linguistic rule. Like I can’t go tell someone who’s name is Lindsay that their name is pronounced Lind-SAY (like day) cuz it’s usually spelled as Lindsey. It’s their goddamn name! At the end, ppl can say it however the hell they want when they talk but there is an absolute answer in the GIF vs JIF debate, and pronouncing it with the strong G like gift is absolutely wrong 😘
Ответитьconst nextF = R.appendToEmoji(_, "da")
nextF('🐏') // ?
Classes freak me out, every time.
lol you are trolling people with gif... the creator put this to bed a while agot... its jif
Ответитьwhat is that extension that shows the return type from a line of code?
ОтветитьDamn, Fireship sounds young! Actually, is this the same guy?
ОтветитьHaving started without any OOP in the first language i used (Blitz 3D, old but still cool), theres a lot of sh't you can do quick and simple you'll never get with OOP eg in Java (and even Kotlin), however in some cases this totally turns around and f*s you over. Develop a game with objects without OOP sucks.
ОтветитьThis mostly depends on what you are doing right now. OOP is better for making closed complex systems and FP is better for universal multipurpose code. From my experience It's best to mix them, I believe it works very nice combined.
ОтветитьToday I learned about emojis
ОтветитьprefixEmoji*
ОтветитьAbout the composition example... video game coders are particularly skeptical of any kind of class hierarchies. That's why the ECS system is gaining traction so much... because class hierarchies are too rigid and pretty horrible as far as reuse is concerned. They're hard to adapt to changing requirements.
Even hardcore OOP people stopped arguing in favor of classical inheritance.
I dont know nothing about functional programming.
It looks so restrictive. If you cant mutate objects, then isnt it less efficient since you have to always clone the object inside a function?
Thank you so friggin much. I just wanted to pick up typescript and i found your channel. Now i have a broad idea on how typescript works and i finally understood how the idea of Interfaces actually work out. Kudos! :)
ОтветитьI'm pretty sure jif isn't wrong either, since G by itself sounds like "jee" instead of Geek without the K
ОтветитьCan you please compare scala.js and typescript compilers? Thanks.
ОтветитьThanks sir!
ОтветитьI never knew you had a soul.
what happened after 2 years to change you so much
Coming from Spring, these composition examples look a little convoluted.
ОтветитьFunctional is so elegant.
Ответитьsong name please!))
Ответитьsuoercool hotdog example
ОтветитьIts jif. The creator literally said its jif. Scuba isnt pronounced scuh bah just because the u stands for "underwater", so saying "it is graphics not jraphics" is dumb.
letters I E and Y generally follow soft g. This is true for literally 19439 of the 19500 words that start with a g
Congrats i thought you was one of those who say oop is trash and fp is better well thx fireship
ОтветитьI watched quite a few of your episodes by now, and I really like your style! Thanks a ton for making these videos!
ОтветитьWhich extensions r u using?
Ответить