3 Key Updates from Go 1.22
HTML-код
- Опубликовано: 2 окт 2024
- What's new in Go 1.22?
💬 Topics:
- Ranging over integers;
- Fixing for loops with closures;
- Methods and wildcard supports on HTTP request mapping;
- Advantages of Go.
✉️ Join the Newsletter - newsletter.awe...
🥇 Become a Member - / @awesome-coding
📖 Blog Article - www.awesome.cl...
📄 Release notes - go.dev/doc/go1.22
📈 Language usage charts - github.blog/20...
#golang
I remember a half year ago I was considering what language choose to learn, between Go and C# and had decided to pick Go. I don't regret
Having used both, why? C# is much easier to use
Yep, Go is definitely a great choice.
Objectively though, with C# you have more job opportunities, especially in enterprise software.
@@MagicNumberArg I have tried and done couple small projects in C# but as main language it's not for me. It was during considering time and it took me 2 months to pick finally Go xD. Im planning try MAUI in the future but at the moment focusing on backend and Go.
C# in enterprise setting is one of the most miserable things in the world. I am telling you from experience having worked in several such companies. The abstraction hell the C# devs create is second to none.. I highly recommend learning c# for your own projects but for the love of God stay away from working with companies who use C#
@@flexdash good to know, I haven't worked as a dev yet. I was considering C# only for job opportunity aspects. I've heard start ups dont like C#, is it true?
That's awesome how the standard library in go is amazing. Thanks for the video!
Glad you enjoyed it!
2024 is Go's year
If you’re a job seeker, Go is an investment into a future where it’s adopted. I would recommend save it as your secondary language, not primary.
For primary just go with JS/TS, Python, Java, or C++ for higher likelihood of landing a job.
i++
@wij8044 I fully agree
*trying to get a job with Elixir*
@@tears_falling That's going to be a bit tough I expect, but really fun if you manage to do it. Good luck!
I would like a job with svelte or just vanillaJS, I also use Python, C# maui and php, I've built some games with tkinter for fun.
trying to understand what you're saying at 1:03 - if the functions are deferred and capturing value when they're called that would be a,b,c.
If they're capturing a reference to the value when they're called, they'd all be pointing at the same time. Furthermore they'd all point to c,
assuming the register is probably being reused between iterations. That could explain why the current behavior is that way before the update.
I am learning golang too. I am currently exploring structs interfaces.... interface is little bit confusing but I really like the language and performance is just awesome
Really love your videos. Been learning go for a while now, Your channel is what made me love go
Great to hear! Thank you for the feedback!
after c# and java to js and typescript.. go and rust has been overdue to me
Go is awesome. Picked it up in 2016 before it became popular.. and it’s given me 7 years of challenging projects.
It’s good for another 10-15 years at least.
A lot of noise around Rust at the moment, but it’s not gaining nearly as much traction as Go did in its early days.
I think Zig will be the next big thing to take off properly.
My main issue with Rust is that it is so damn hard :))
Or maybe I'm just dumb and can't figure it out already...
@@awesome-coding ha ha .. no, that makes you one of the smarter programmers.
It’s not that you can’t learn it or get good at it. It’s your instinct telling you “no, this is wrong, it’s trying too hard to turn a simple problem into an over complicated mess, and I don’t want to play that game”
@@steveoc64«turn a simple problem into an over complicated mess» (c) typical go dev that lives in their own ecosystem
@@stefano_schmidt wrong again buddy - try harder
You sound like a typical React “coder” turned “rust expert” who doesn’t understand the difference between using other people’s abstractions vs programming the computer.
Enjoy your ride on the me-too rust bandwagon whilst it lasts
@@steveoc64Are you that angry because you have to handle errors in Go in a weird way😂
Don't be that upset, at least you have "faster" compilation times
Let's Go Go 😉
I mean, I'm not seeing it. Where's the support for openapi, swagger?
I don't know much about GO, so I didn't understand the first two points :(
Those are just improvements to the for construct, which are going to help you in the long run.
I tried to give more ample examples so that people without prior experience could get a feel of the language.
Hey, thanks for the video. May I ask what is the globe icon prefix at 1:46?
Hey! That's an icon that IntelliJ IDEA inserts before URLs. Nothing fancy, just some IDE stuff.
@@awesome-coding Thanks! I was wondering if it can call the curl simply within the editor.
Go has a parameterized url router baked into the stdlib?
pkg.go.dev/net/http#ServeMux
Yep. We even has templating, file io, and json parser built in.
If Golang had option type instead of `nil`, it'd be perfect
Yep - that's pretty much expected from a modern language these days.
It’s not really a problem in prod. It’s not like having null pointers in C
It is totally valid in go to call methods on instances that are nil, without segfaulting
Cant believe we didnt have "params" until now when creating servers. No wonder we had to try gin or other frameworks.
go has never been better so much today and i want go more than ever that the past 3 years i've been practicing it
As a junior engineer how should I start learning go? Any good resources that would help kickstart my learning?
did they change "unused variable" error to warning? 😮
should i beginn with go or better rust?
If you don't have prior development experience you should start with Go.
Rust is too complex, and you might get discouraged.
Hello New here, what does this quote mean @ 0:58 ?
"Since the execution is likely to happen after all the iterations, the output of this code"
: Why would each execution happen for each iteration ?
So you have a for construct iterating 3 times.
For each iteration, an anonymous function is called. However note the "go" keyword before the func().
This makes the function a goroutine, which is a block of code which will be executed on a separate thread.
So the for will actually "start" threads and run that block of code in parallel once on each thread.
Does it make more sense now?
I ❤ Go
Where are you getting the data for top langauges of 2023?
State of Octoverse - github.blog/2023-11-08-the-state-of-open-source-and-ai/
do you have a link to the release notes for the http std library?
I apologise - I forgot to link it.
Here are the release notes: go.dev/doc/go1.22
I love how Awesome is transforming into a Go dev 👌
😅 You can't stay in the Java hell forever, and JS is not really a language, right? 😂✌️
Are exceptions still returned as a function result?
They are actually called errors, and yes, they are built-in into the language.
@@awesome-coding error as a returned function result is a shit practice. I think that's the only reason why I don't learn Go.
@@ReRubis I get your take on this - it makes the code more boilerplatey than it needs to be.
I also get why they did it like this in the first place. Clearly the Option / Optional approach from languages like Rust / Java are better DX, but it is what it is 😅
what extension gave you that globe icon in every url?
That's the default behaviour in IntelliJ IDEA.
Ohh, i thought you were using vscode
Any good ressources to recommend to learn Go?
The Go tour is a nice crash course.
go.dev/tour/welcome/
I'm a big fan of reading books when learning new languages, and I recommend Go in Action.
www.amazon.com/Go-Action-Erik-St-Martin-ebook/dp/B09781M512
On YT, I'm mostly following Anthony for good quality Go content.
www.youtube.com/@anthonygg_/videos
@@awesome-coding thank you! I'll take a look at it this weekend. Really appreciate your videos
@@frhazz Good luck!
Every day is a good day to learn Go
Facts.
Nice.
Thank you! Cheers!
am still getting ccc
Make sure you have the 1.22 version in your go.mod file.
yeah, this was it!@@awesome-coding
Love your videos
Thank you!
Nah, it's a good year to learn Rust.
I know - I want to start posting rust content on the channel, but the learning curve is tough.
I'm like two books in, and a bunch of pet projects built, and I'm still scratching my head from time to time.
can you please shut up with your Rust already? Has anybody asked anything about Rust here?
that's like exactly my current state 😅@@awesome-coding
@@rw_panic0_0 jeez, dude :D I just stated a fact - I am learning Go, but it will be definitely year of Rust.
@@hahabanero damn, sorry, I'm getting aggressive on the internet sometimes, maybe I gotta go breathe some air..
Please do not learn go, I don't want it to turn into a Python.