Golang Generics. Do we ACTUALLY need them!?
Вставка
- Опубліковано 22 сер 2024
- Golang Generics. Do we ACTUALLY need them!?
In today's Golang video, we will talk about the implementation of Generics in the Go programming language. We will go through the reasons why we need Generics or why we don't need it in Golang, along with some points that we need to know as a Go/Golang developer from the generics implementation proposal. 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 Explained - • Golang Rune - Fully Un...
--
#golang #goprogramming #golangdojo - Наука та технологія
📝Get your *FREE Golang Cheat Sheet* -
golangdojo.com/cheatsheet
I used my email njugiastudio@gmail.com but didn't get the cheatsheet. All it says is account created
It’s coming soon in the next few weeks
Personally I would love if they used instead of [T any] 😀
Would conflict with operator less
Try typescript
That is not a big deal as far as the feature works well.
but the latter also would conflict with index operator, that's not appropriate counter argument
The reason is cause the EBNF discrete grammar
finally found a good video explaining about generics.
Awesome video buddy
Thank you! More on the way
You're an up and coming UA-camr and I'm trying to learn Go. I thought we might hit it off, until 1:24 happened. You crossed a line there.
I don't get it. What happened at 1:24? Edit: nvm, just noticed that..
:P
Great explanation! Apprecaite it
3:33 8.43M subs.
Soon man, soon
Awesome video editing also great content !!
Glad you liked it!!
Young Man you are fire, good Clarification
you are such a fantastic teacher . do you have a golang course ?
Soon!
Your videos are amazing 🔥
Glad you like them!
Awesome like always!
Thank you!
when will it come!!!!!!!!!!!????
and please make a series of Web Development in GO!
Haha, it's right after the upcoming Concurrency series
@@GolangDojo which framework / library you're gonna be using in web?
1:24 kkkkk.. crazy!
Is your current job about Go programming? Or are you still professionally programing in Java? If the answer is the first one, I would love to hear about your job
I guess you wouldn't want to hear about it then lol
@@GolangDojo 🤣🤣🤣
why i can't use generic in go version 1.16.6, it show syntax error: unexpected [, expecting (
On golang.org -- "To set expectations, if everybody is completely happy with the design draft and it does not require any further adjustments, the earliest that generics could be added to Go would be the Go 1.17 release, scheduled for August 2021."
Can’t wait
Same!
I'm watching this after go 1.18, 😅
I love your videos. Kudos to you brother
Thanks a bunch, helped a lot!🙂 Just a question: On what version of the go compiler will this piece of code still work?
type Type interface {
type int, string
}
On version go1.19.2 linux/amd64 , I am getting the following error:
, identifier or '}' expected, got 'type'
I am actually with go, generics makes your code unreliable and convoluted , I rarely use generics unless it makes sense. but i do like it to be a feature, because you do rarely need it.
1:25 You're wrong for that one
😭😭😭😂
Yes.
Thanks for sharing. I enjoyed the video, particularly your explanation of the the problems of not having generics and the alternatives. I'm very new. to go, but I understand another alternative is code generation, which is still duplicating code but without having to do it manually. Perhaps you could talk about that in the future. It is curious because I believe Go is probably the only major statically-typed programming language without Generics. In an comparison in the reverse direction, it is also curious how it is until recently that many programming languages have started to incorporate the same concurrency features that Go has had for a long time (e.g. Java's Project Loom).
On top of that, generics is coming to 2 months!
great video thanks for this
Glad you enjoyed it
Good explanation. Thank you.
i work with Go everyday and ill take anything to make it easier to stop having to write switch(typeof whatever) case type1 case type2 etc etc....
Hahahaha
Idk, I write go for 1.5 years and I have probably not used type switch once. I guess I usually write a concrete code lol
@@axea4554 I write a lot of dev tooling, so i have to make my code incredibly general purpose.. so yeah reflection and type switches come around here and there haha
Love it.
Thanks!
Check the trash of 1:25 second. There was rustlang
Golang of cause always contained generics, they are just too useful (as you said in map and arrays)
Just user defined genetics were delayed quite a bit
1:25 lmao 😂
Isn't there type "any" in Go?
We don't know yet. We shall see soon!
Can I apply this concept in Typescript generics
Don't know much about Typescript unfortunately!
RUST in DUSTbin ????
1:25 Rust!! 😂😂😂
;)
This is Ferris animal abuse 1:23