Golang Generics is Officially HERE!! (Full Tutorial)

Golang Generics is Officially HERE!! (Full Tutorial)

Golang Dojo

2 года назад

42,676 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@birqan
@birqan - 17.03.2022 04:20

A very good instruction in go generics. Well done buddy.. 🥇

Ответить
@quocnho
@quocnho - 17.03.2022 05:54

Thanks for your sharing!

Ответить
@shinsanity6011
@shinsanity6011 - 17.03.2022 06:08

Is 1.18 production ready? I am using 1.17 on my working project but it on early stage, I want to switch version to 1.18 but I'm scare of reliability. Thank you

Ответить
@gerardgauthier4876
@gerardgauthier4876 - 17.03.2022 06:12

I have to say, I doubt generics will make much of a difference in GoLang's popularity. GoLang is popular for a number of good reasons:
1. Unicode(utf-8) out of the box.
2. Simple to build.
3. Interfaces. i.e. a simple object model.
4. Concurrency.
5. Memory safety.
6. Higher order functions.
7. Code that's not cluttered with boiler plate. Very clean and standard source code bc of enforced standard formatting.

Generics might attract a few curious Java and C# programmers but I doubt they'll hang around long.

I almost forgot... Sane IO and slices.

Ответить
@ThisAintMyGithub
@ThisAintMyGithub - 17.03.2022 06:24

Great video! Also, if you don't mind me asking, what is your IDE theme?

Ответить
@ChristopheFerauge
@ChristopheFerauge - 17.03.2022 12:47

Very well explained. You're not only a golang Ninja ... but also a teaching Ninja. Thank you very muvh.

Ответить
@will_i_em
@will_i_em - 17.03.2022 15:07

Generic types or Generics 🙄

Ответить
@NORD_LK
@NORD_LK - 17.03.2022 17:50

Thanks for this. Really good content

Ответить
@redcrafterlppa303
@redcrafterlppa303 - 17.03.2022 20:33

No front but I really can't understand why Go broke generics convention and used [ ] instead of <>. I don't care if <> is used in some other way but this looks unnatural and irritating for everyone coming from any other language. Many features differ between languages but for all languages I know generics are everywhere syntactically similar if not equal.

Ответить
@wolverine2970
@wolverine2970 - 17.03.2022 23:41

Great content! Thanks for the channel!

Ответить
@stephenkrus
@stephenkrus - 18.03.2022 08:30

Dude... I sorta understand it as budding noobie-Golang-coder. But I have to re-watch it again when my knowledge and experience had matured. So Generics is how it handles, sorts any data types. Hmm... 🤔

Ответить
@anton4ik55
@anton4ik55 - 21.03.2022 16:30

So are you ripping off "Let's Get Rusty" style or is he ripping off yours?

Ответить
@dominikvrbic7199
@dominikvrbic7199 - 22.03.2022 13:19

Are you going to update the cheat sheet with Generics?

Ответить
@CarloLobrano
@CarloLobrano - 23.03.2022 19:29

thanks for this video, it is quite clear 👍

Ответить
@samhanna7382
@samhanna7382 - 24.03.2022 10:16

go is inferior to rust

Ответить
@nicolito128
@nicolito128 - 26.03.2022 07:02

I'm learning go and all these new things are really exciting for me <3

Ответить
@_slier
@_slier - 27.03.2022 16:55

long time not coding in go.. probably 5 years already.. is error handling any better? or is it still Nazi style error handling? god damn, they should introduce union type..

Ответить
@gerardgauthier4876
@gerardgauthier4876 - 02.04.2022 05:58

(edit)Actually after a week to work through some, not so cute examples I have found a very workable generic pattern that works for even complicated generic types.
Has anyone tried generics in Golang? I mean besides the cute examples! I can see this being the straw that broke the camel's back for some people trying GoLang. Talk about a half-assed approach to generics. Why would they produce such a terrible feature and then release it?

I used generics in Java, C#, C++, OCaml, and several other languages and I've never come across such an odd implementation of generics... I think they should have stuck without generics.

Ответить
@matheusgaldino8337
@matheusgaldino8337 - 12.04.2022 15:33

Great video!

Ответить
@vinaykumarva8538
@vinaykumarva8538 - 19.04.2022 09:52

we want more videos basic golang I'm from India waiting

Ответить
@prashantnavrange9514
@prashantnavrange9514 - 01.05.2022 15:09

very crisp and clear explanation of generics concept. thanks!

Ответить
@bxhehehehdhdhhd1443
@bxhehehehdhdhhd1443 - 07.05.2022 23:05

Cool vid, thanks for the help

Ответить
@vitiok78
@vitiok78 - 09.06.2022 18:53

After this video I am officially moving from Typescript to Go.
Genetics are the necessity nowadays. Even the PHP crowd is waiting for them for a long time.
Excellent!

Ответить
@jivy22
@jivy22 - 25.06.2022 15:54

Hey, great explanation on generics, thank you! Are you planning another Video with generics in combination with Interfaces? Just asking for a friend… 😉😉

Ответить
@digvijayyamagekar4300
@digvijayyamagekar4300 - 29.06.2022 13:17

is this dubbed in english?

Ответить
@samme4life
@samme4life - 02.07.2022 03:57

Good explanation. Thank you for sharing your knowledge.

Ответить
@AkumetsuOne
@AkumetsuOne - 20.07.2022 05:49

Which environment are you using to dev? And which plugin allow look the var like it appear?

Ответить
@codelucky
@codelucky - 27.07.2022 13:00

Goland vs VSC ?

Ответить
@baihuig
@baihuig - 03.08.2022 10:53

really helpfull video! 只是,怪腔给怪调开门——怪到家了!

Ответить
@lawrencejob
@lawrencejob - 05.08.2022 05:35

This channel is exactly what I’ve been looking for; thank you

Ответить
@kishanbsh
@kishanbsh - 05.08.2022 06:08

What about the "comparable" type ?

Ответить
@WiredMartian
@WiredMartian - 07.08.2022 12:31

You've just changed my mind about Generics in Go!

Ответить
@alltech9096
@alltech9096 - 08.08.2022 06:12

How to add different generics to param 1 and 2

Ответить
@dayanaracontreras4857
@dayanaracontreras4857 - 02.09.2022 13:36

Goland is cool!@

Ответить
@jabuci
@jabuci - 20.09.2022 11:32

It was crystal clear. Thanks!

Ответить
@flipperiflop
@flipperiflop - 26.09.2022 21:51

This really helped me to understand how generics work in general - I always thought it to be some kind of a "higher level" thing, but it really is just a placeholder in a way, allowing generalizing functions, but also constrain the types the function works with.

Ответить
@orlandoemilianogarciadiaz2531
@orlandoemilianogarciadiaz2531 - 04.10.2022 00:41

Amazing video!

Ответить
@torbilan6292
@torbilan6292 - 04.10.2022 10:12

tried to listen for three minutes, content is great, but the accent is terrible

Ответить
@unamed6136
@unamed6136 - 24.10.2022 00:24

amazing explanation, ty

Ответить
@GreyDeathVaccine
@GreyDeathVaccine - 15.11.2022 23:51

Insta sub - just for funny versions of go mascot.

Ответить
@RobDuarte
@RobDuarte - 06.12.2022 01:40

Excellent video. Succinct and well organized. Thanks for this.

Ответить
@jtcrew1
@jtcrew1 - 13.12.2022 02:21

Great tutorial overall! Why did your min(sf, 0.2) return 0.3 (incorrect) when the generic type was defined as ~float64? This problem did not exist when the generic type was defined using "type set". Is this another example of the compiler not being compatible with the latest language additions?

Ответить
@Zwartepiet777
@Zwartepiet777 - 09.02.2023 18:06

thanks!

Ответить
@undochlorine
@undochlorine - 01.05.2023 08:58

I'm beginner in Go, and I didn't know what generics is, but I heard everyone was looking forward to their releasing. Now I see and it looks like Go is losing it's tight types constraints and becomes TypeScript with their dope ANY, and everyone is happy about.... but it's awful, isn't it?

Ответить
@JulioCesar-ym6by
@JulioCesar-ym6by - 30.05.2023 04:21

I wonder, is the future of all newer languages ​​upgrading to the robustness of older languages? And we enjoy this "new" features 😅

Ответить
@RobertWHurst
@RobertWHurst - 06.08.2023 08:34

Well kinda. You can't use them on struct methods which rules out about 60% of the use cases where I want to use generics.

Ответить
@johnboy14
@johnboy14 - 01.10.2023 16:28

The inclusion of generics has made me more interested in the language because support for polymorphism is a pretty key tool in alot of codebases I work on. Why it took so long to implement Generics in GoLang is a mystery to me.

Ответить
@masoodk1988
@masoodk1988 - 18.03.2024 21:54

thank you bro

Ответить
@Armetron
@Armetron - 01.07.2024 18:18

something I've recently done was needing to create a certificate generation function that could accept both RSA keys and EC keys, I did it slightly differently where it could accept any type and if it didn't mach a supported type it would error out. Now I should be able to go back and make it more strongly typed thanks to Generics

Ответить