Advanced Golang: Generics Explained
Vložit
- čas přidán 3. 06. 2024
- Generics help you to do more with less code, by using generic types instead of concrete types. While Generics have been part of other programming languages for quite some time, Generics was only recently added to Golang as of the 1.18 release in 2022. Generics can be used to define functions, structs and maps.
The way you explain things are too good brother ! Hopefully you are going to make a series on advanced golang, I am sure it would be the best stuff out there 🚀💪
Yes please
This was awesome. I wish you had more subscribers, you really deserve it. Keep up the good work... 👏
The best introduction to generics-huge thanks!
Nice! keep these videos coming Ryan
Amazing intro to Generics and that Map Comparable explanation was really T -- spot on
You have explained it so nice, now we want 12hr full course, too good to be a 10 min tutorial 😂😂😂
Explanation is Top Notch. I clearly understood everything.
Love the way you teach, very calm
This is so clean and we'll explained. Thank you
Great video once again! Clear and relevant examples well explained
Love the way you explain generics
Thank You! All very clarify and helpful.
This is really a very great video and I am so happy I found your channel... I would developed a package I am working on much better if I had seen this video first.. Thank you very much Ryan
Hi Bud, it was definitely a tip-top explanation, thanks a bunch!
my new favorite golang channel -- ty Ryan
One of the better tutorial on Generics I have watched. Concise, to the point, and thorough. Thank you!
While I'm not a fan of generics, I am a fan of this channel. Great video, well done!
Damn i was actually waiting for generics at one point. Which solved Lots of problems for me
Good to see you here as well.
Muy buen video, me encantó la explicación de Generics, simple y concisa.
First time watching your video. Amazing content, keep up the good work.
Great explanations, well done.
Thanks a lot!! Well explained!
Awesome video and author!
👍 Nice 👍 job 👍 very helpful, short kept and to the point.
You have an awesome voice. So ASMR!
And plus it reminds me of Agent Smith, which shouldn't be a good thing, but it is. And yes, very clear explanations, excellent examples. I immediately subscribed.
Brilliant, Thanks for this...
you should make more videos man. appreciated.
you made it as a piece of cake )) cool , good explanation
Great video, thanks ❤
Fantastic as always bro
Thanks for this useful content about Generics very thanksfull
4:55 I think alias would be `type UserID = int'. Now UserID is a new type with underlying type of int.
new to the channel really liked the video 😁
excellent explanation!
Waiting to buy your golang course :), realy nice vídeo btw
Great stuff as usual.
Great video dude love it
Best Go tutorial on CZcams.
Great video
Thank you!
I'll be damned, just what I was looking for. Word by word. Thanks mate.
8:42 map could be any type. You could have an array of some structures and map a function that goes from structure to structure. The type inference ought to be able to handle everything. I know it can in Standard ML which was around in the eighties.
Great video!
Nice video.
I hope you do a full advanced serie of go
i already know about generics in Go But the way that you explained it and your deep voice is just cool hhhh
Good vid my man
Amazing!!!
How do you bring the terminal from the top? The one that pops up from the top
well explained!
that audio quality though 10/10
Thx a lot
Man’s got a radio show host voice
Awesome!!!
nice vid!
Please create a playlist for beginner 🙂
i have a question... why on minute 3:20 he creates an interface and not a struct?
how do you have your terminal come down from the top like that?
At 4:25 I notice the interfaces being declared with the types and they have a `~` prefix. While you explain what it does, it seems like I can't find any resource for it. Can anyone link me a resource on the official website? Also I don't see the point of using Generics with Maps.
1:45 how did you change both types together
What happens on error like deviding two empty strings?
Nice intro to the topic buddy! I'm coming from C++ and I think Go's approach to generics is very clear and keeps the language simple.
GoLand IDE worth it? Saves time?
what a voice!
Where have you been all my life.
You are using Goland IDE. You can just click the green button to run the program. Why are you using terminal instead? Specific reason? Just curious.
are you using a hackintosh?
Do you use a mouse or a touchpad?
🤓: Generics
🧐: Parametric Polymorphism
Hi from Russia and thank u so much for such a simple and understandable explanation))
Good video. You don't do all the annoying shit that other do way too much of: background music, showing excitement ("Hey!! What's up, CZcamsrs?!!"...), silly sound effects, etc. Just pass along knowledge to people who want to know.
Considering it is official it is odd you can't just call something like "ordered" in the import.
I like u voice tho
I dont get why go has no proper array functions like map filter and reduce natively just like js/node. Even with generics, the fact that you always have to code that up is ridicioulos. Makes me not want to commit to Go tbh
one of my mayjor deciding factors whwn wanting to code my startup. I need expressiveness, which most of my apps is filtering data.
Generics in go are ugly. Why the hell does it not infer type automatically? It looks like not generic but more like “multi typing” and syntax is also ugly.
Video is cool though 👍
9 That was the true Light, which lighteth every man that cometh into the world.
10 He was in the world, and the world was made by him, and the world knew him not.
11 He came unto his own, and his own received him not.
12 But as many as received him, to them gave he power to become the sons of God, even to them that believe on his name:
13 Which were born, not of blood, nor of the will of the flesh, nor of the will of man, but of God.
14 And the Word was made flesh, and dwelt among us, (and we beheld his glory, the glory as of the only begotten of the Father,) full of grace and truth.
(Jn.1:9-14)
Just use and save the hustle unless one truly requires generics. Go generics are not as great.
Generics in go are really ugly. wish the type system was a bit smarter
Great video