No video

Is Golang Object Oriented!? (OOP)

  Рет қаралды 21,936

Golang Dojo

Golang Dojo

Күн бұрын

Is Golang Object Oriented!? (OOP)
In today's Golang video, we will talk about the reasons why and how Go is not an object oriented programming language. We will go through why OOP is invented, its 4 main features, problems with OOP, and how Go programming language's solve its OOP problem. Enjoy!
--
Golang Dojo is all about becoming Golang Ninjas together. You can expect all kinds of Golang tutorials, news, tips & tricks, and my daily struggles as a Golang developer. Make sure to subscribe if you look forward to such content!
Get Your Golang Cheat Sheet! - golangdojo.com...
Git repos & notes - golangdojo.com...
Golang Informative - • How much do Golang dev...
--
#golang #goprogramming #golangdojo

Пікірлер: 60
@GolangDojo
@GolangDojo 2 жыл бұрын
📝Get your *FREE Golang Cheat Sheet* - golangdojo.com/cheatsheet
@aaron_journey
@aaron_journey 2 жыл бұрын
I'm converting my project from Python to GoLang. It was great experience. Thanks for such a great video!
@edboss36
@edboss36 2 жыл бұрын
To make it faster?
@GolangDojo
@GolangDojo 2 жыл бұрын
Glad you liked it!
@74Bagas
@74Bagas 2 жыл бұрын
imagine, me from nodejs... delicious
@thanhtupham4726
@thanhtupham4726 2 жыл бұрын
i've always presume that OOP is a must in any programming languages. Go is like a whole new world to me
@GolangDojo
@GolangDojo 2 жыл бұрын
Same with me at first!
@manpt123
@manpt123 Жыл бұрын
whole new world because you are a self learner programmer. Golang is just like c which is the basic of all programming language.
@AndrewErwin73
@AndrewErwin73 Жыл бұрын
So, I get into the discussions a lot. The problem with inheritance isn't inheritance itself, but the fact that is so often misused (and indeed misunderstood). Full disclosure, I am primarily an OOP developer, I just think in objects. I really like your point about duck typing, and I think if more people understood that idea, inheritance wouldn't get such a bad wrap. Example... take the super class A. It has a set of functions that are useful for other things. But it IS a thing. If you decide to inherit from A (class B extends A), the very first question you should ask is "is B an A?"... the problem is that a lot of people (anecdotally speaking for myself and 20+ years of experience) might look at the methods within A and say "yeah, that is what I want to do". This is NOT a good reason to inherit from that class. I have seen it so many times. And where you run into problems is when something DOES change with class A!, It will generally not (assuming the overall architecture is good in the first place) affect subclasses that ARE an A! What it WILL affect (and usually adversely) is a random class that just wanted to use the functions that already existed within A (but that are not As themselves). So, I do love the duck method you refer to. I think that should be the rule in OOP (not just with inheritance, but with interfaces and polymorphism in general as well). Thanks for the video. I am getting deeper into Go and find your content very useful.
@yoda-of-soda
@yoda-of-soda 2 жыл бұрын
In 6:26 you don't need to include the "super struct" as a variable just remove "human" from line 13 and the struct is "inherited"
@blenderpanzi
@blenderpanzi 2 жыл бұрын
As I learned it at uni, inheritance is not a necessary part of OOP, subtyping is. It is often conflated in many programming languages, but doesn't have to be. Inheritance is basically about code reuse, subtyping is about a more formal relationship between types, see the Liskov substitution principle.
@vanjazed7021
@vanjazed7021 2 жыл бұрын
8:10 it is a state of mind. GO does lack subtyping via class inheritance but composition over inheritance is a thing in Java, C# etc. and is actually prefered. Class inheritance is still useful when you want to hide some library/framework glue inside base class, but it can be achieved in other ways. I like GO, but languages like C#, Scala, Python, etc. happily mix OOP, procedural, functional and work just fine.
@cs_student1094
@cs_student1094 10 ай бұрын
Encapsulation is not about making some data private , this is called data hiding. Encapsulation as defined in the object oriented through process book is about making data and behaviors ( methods ) into a single unit
@softwarearchitect9171
@softwarearchitect9171 2 жыл бұрын
Could you please make a video about Golang modules, thank you.
@GolangDojo
@GolangDojo 2 жыл бұрын
In the pipeline!
@flexairz
@flexairz 2 жыл бұрын
@@GolangDojo Interfaces also please...
@esra_erimez
@esra_erimez 2 жыл бұрын
What you said at 8:05 simply cannot be overstated!
@angeldev96
@angeldev96 2 жыл бұрын
This is my favorite channel of golang content.
@GolangDojo
@GolangDojo 2 жыл бұрын
Awesome!
@Ciprian-Amarandei
@Ciprian-Amarandei Ай бұрын
OOP: Birds fly Procedural: Birds are flown
@sigreer83
@sigreer83 2 жыл бұрын
Really enjoying the vids. Many thanks!
@GolangDojo
@GolangDojo 2 жыл бұрын
Glad you like them!
@Serpiall
@Serpiall 2 жыл бұрын
Nice video dude. really well produced and answered the questions I had
@abubelal2553
@abubelal2553 2 жыл бұрын
You mentioned in oop one danger with inheritance is changing a super class method causing breaking changes. How does go solve this issue? Based on composition the same problem exists?
@ZamaaN
@ZamaaN 2 жыл бұрын
if chnage means renaming identifiers to you, then good luck to you...
@abubelal2553
@abubelal2553 2 жыл бұрын
@@ZamaaN I was hoping someone with experience would answer but thanks for your comment anyway.
@GolangDojo
@GolangDojo 2 жыл бұрын
I will make a more example focused video soon!
@faldikn
@faldikn 2 жыл бұрын
Can u make video about Go packages? Best go packages or most useful
@GolangDojo
@GolangDojo 2 жыл бұрын
Will do soon!
@JimRohn-u8c
@JimRohn-u8c Жыл бұрын
So I still don’t understand, if you don’t use OOP in Go what do you use? I’m still a noob so don’t know everything.
@fabricehategekimana5350
@fabricehategekimana5350 Жыл бұрын
Tbh not everything need to be put in a case. Now some languages are build with a specific goal and take the functionalities of paradigms (like OOP, FP, concurent, parallelism, procedural, ...) without taking everything to achieve the said goal. There are for instance, Go, Rust, Nim that do so
@TJ-wc3iq
@TJ-wc3iq 2 жыл бұрын
That is something I'm interested in 🤗
@GolangDojo
@GolangDojo 2 жыл бұрын
Great to hear!
@denilbhatt1005
@denilbhatt1005 2 жыл бұрын
Yes surely need a deeper understanding of Interfaces please..!!
@GolangDojo
@GolangDojo 2 жыл бұрын
On the way!
@aashishupadhyay5566
@aashishupadhyay5566 Жыл бұрын
programming or hooogramming?
@Jediahgames
@Jediahgames 11 ай бұрын
I'm learning Go for a college assignment and I've been liking most of it but the OOP-like stuff is so damn verbose and overly complex Also I don't understand the problem you mentioned with inheritance in OOP languages, seems like a non-issue, just don't put errors in the base class??
@justellvonk2518
@justellvonk2518 2 жыл бұрын
Thank you soo much for this!
@danikingrd
@danikingrd 2 жыл бұрын
Let’s get rusty guys
@GolangDojo
@GolangDojo 2 жыл бұрын
LOL
@Dev_Everything
@Dev_Everything 2 жыл бұрын
I stopped using GO for this reason. Its fine for little projects but designing anything substantial it quickly becomes a mess. I am actually in the process of converting everything to C++
@kaushik5055
@kaushik5055 2 жыл бұрын
👍
@KimberlyWilliamsch
@KimberlyWilliamsch 7 ай бұрын
Is golang OOP?
@rumpeldrump
@rumpeldrump 2 жыл бұрын
I think that's a mistake by yours. You think OOP ist class oriented. But that's not true. Alan Kay's definition here: “1. Everything is an object, 2. Objects communicate by sending and receiving messages (in terms of objects), 3. Objects have their own memory (in terms of objects), 4. Every object is an instance of a class (which must be an object), 5. The class holds the shared behavior for its instances (in the form of objects in a program list), 6. To eval a program list, control is passed to the first object and the remainder is treated as its message”
@GolangDojo
@GolangDojo 2 жыл бұрын
What do you mean by class oriented? Thank you for the comment!
@rumpeldrump
@rumpeldrump 2 жыл бұрын
@@GolangDojo I think that OOP is equated with the c++ family. There are some people who say Java is not OOP, as it only allows single inheritance.
@ZamaaN
@ZamaaN 2 жыл бұрын
@@rumpeldrump lol, who says that? Java supports all types of inheritance. study well before talk...
@DroidZed
@DroidZed 2 жыл бұрын
@@ZamaaN He meant Java does not support multiple inheritance between regular classes , but that can be compensated with multiple inheritance between interfaces...
@rumpeldrump
@rumpeldrump 2 жыл бұрын
@@ZamaaNthat would look good on you too. Java has no multi inheritance and use primitive types. And don't tell me about interfaces. Implementing is not the same as extending.
@MarcosVMSoares
@MarcosVMSoares 2 жыл бұрын
OOP can't be but funcional its a joke hahahaa without having map, filter and reduce ^^
@fabricehategekimana5350
@fabricehategekimana5350 Жыл бұрын
It true FP > OOP
@parlor3115
@parlor3115 Жыл бұрын
No Go is crap-oriented. I can't believe no other GC-based language have attempted to do what Go did before, which is compile to native code directly. There are efforts in this direction in .NET but honestly, it's late with modest results
@fabricehategekimana5350
@fabricehategekimana5350 Жыл бұрын
Why ? Go learned from his predecessors and have modern features without keeping the heavy old features. It will be a winner in the long run
@adrewkin8375
@adrewkin8375 2 жыл бұрын
Please Stop using this artificial vocie! I sure your video will be better with your natural voice. you triying to much with the voice.
@KevinNijmeijer
@KevinNijmeijer 2 жыл бұрын
He's just speaking English with a (I presume, correct me if I''m wrong) Japanese accent. If you speak perfect English as a native Spanish person, good on you! But Japonic language and Germanic language are extremely far apart, even to the point where the style of speaking is completely different. So while for us Latin / Germanic people, the flow of English language is easy, for other languages it might be incredibly different / hard.
Why doesn't Google use Golang for Android Development!?
8:07
Golang Dojo
Рет қаралды 21 М.
From OOP to GO
32:59
CNCF [Cloud Native Computing Foundation]
Рет қаралды 6 М.
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 11 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 18 МЛН
Вы чего бл….🤣🤣🙏🏽🙏🏽🙏🏽
00:18
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
Object-Oriented Programming is Bad
44:35
Brian Will
Рет қаралды 2,3 МЛН
Why I'm learning Go
21:35
Web Dev Cody
Рет қаралды 62 М.
STOP Using Classes In JavaScript | Prime Reacts
14:02
ThePrimeTime
Рет қаралды 233 М.
Ditch your Favorite Programming Paradigm
6:08
Code Persist
Рет қаралды 178 М.
Golang Error Handling is TRASH!!! Here's how to fix it
8:35
Golang Dojo
Рет қаралды 40 М.
Object Oriented Programming is not what you think it is. This is why.
13:36
Object-Oriented Programming is Good*
9:45
Brian Will
Рет қаралды 147 М.
What can you build in Golang?!
11:10
Golang Dojo
Рет қаралды 172 М.
Advanced Golang: Channels, Context and Interfaces Explained
22:17
Code With Ryan
Рет қаралды 116 М.
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 11 МЛН