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

Комментарии • 90

  • @paca3107
    @paca3107 7 месяцев назад +60

    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

    • @RiwenX
      @RiwenX 7 месяцев назад +8

      Having used both, why? C# is much easier to use

    • @awesome-coding
      @awesome-coding  7 месяцев назад +17

      Yep, Go is definitely a great choice.
      Objectively though, with C# you have more job opportunities, especially in enterprise software.

    • @paca3107
      @paca3107 7 месяцев назад +5

      @@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.

    • @flexdash
      @flexdash 7 месяцев назад +8

      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#

    • @paca3107
      @paca3107 7 месяцев назад +1

      @@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?

  • @licokr
    @licokr 7 месяцев назад +1

    That's awesome how the standard library in go is amazing. Thanks for the video!

  • @nyashachiroro2531
    @nyashachiroro2531 7 месяцев назад +14

    2024 is Go's year

  • @wij8044
    @wij8044 7 месяцев назад +8

    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.

    • @dipsagungurung4553
      @dipsagungurung4553 7 месяцев назад +1

      i++

    • @awesome-coding
      @awesome-coding  7 месяцев назад +2

      @wij8044 I fully agree

    • @tears_falling
      @tears_falling 7 месяцев назад

      *trying to get a job with Elixir*

    • @awesome-coding
      @awesome-coding  7 месяцев назад +2

      @@tears_falling That's going to be a bit tough I expect, but really fun if you manage to do it. Good luck!

    • @abrahamsimonramirez2933
      @abrahamsimonramirez2933 7 месяцев назад +1

      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.

  • @hirenpatel6118
    @hirenpatel6118 7 месяцев назад +1

    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.

  • @jitxhere
    @jitxhere 7 месяцев назад +3

    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

  • @keshavakumar9828
    @keshavakumar9828 7 месяцев назад +3

    Really love your videos. Been learning go for a while now, Your channel is what made me love go

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      Great to hear! Thank you for the feedback!

  • @user-qr4jf4tv2x
    @user-qr4jf4tv2x 7 месяцев назад +1

    after c# and java to js and typescript.. go and rust has been overdue to me

  • @steveoc64
    @steveoc64 7 месяцев назад +2

    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.

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      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...

    • @steveoc64
      @steveoc64 7 месяцев назад +1

      @@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”

    • @stefano_schmidt
      @stefano_schmidt 7 месяцев назад

      @@steveoc64«turn a simple problem into an over complicated mess» (c) typical go dev that lives in their own ecosystem

    • @steveoc64
      @steveoc64 7 месяцев назад

      @@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

    • @stefano_schmidt
      @stefano_schmidt 7 месяцев назад

      ​@@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

  • @abrahamsimonramirez2933
    @abrahamsimonramirez2933 7 месяцев назад +1

    Let's Go Go 😉

  • @s3ts
    @s3ts 7 месяцев назад

    I mean, I'm not seeing it. Where's the support for openapi, swagger?

  • @moinulmoin
    @moinulmoin 7 месяцев назад

    I don't know much about GO, so I didn't understand the first two points :(

    • @awesome-coding
      @awesome-coding  7 месяцев назад +1

      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.

  • @itworkswhy
    @itworkswhy 6 месяцев назад

    Hey, thanks for the video. May I ask what is the globe icon prefix at 1:46?

    • @awesome-coding
      @awesome-coding  6 месяцев назад

      Hey! That's an icon that IntelliJ IDEA inserts before URLs. Nothing fancy, just some IDE stuff.

    • @itworkswhy
      @itworkswhy 6 месяцев назад

      @@awesome-coding Thanks! I was wondering if it can call the curl simply within the editor.

  • @pengurrito7136
    @pengurrito7136 7 месяцев назад +2

    Go has a parameterized url router baked into the stdlib?

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      pkg.go.dev/net/http#ServeMux

    • @muhwyndham
      @muhwyndham 7 месяцев назад

      Yep. We even has templating, file io, and json parser built in.

  • @flamakespark
    @flamakespark 7 месяцев назад +1

    If Golang had option type instead of `nil`, it'd be perfect

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      Yep - that's pretty much expected from a modern language these days.

    • @steveoc64
      @steveoc64 7 месяцев назад

      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

  • @erickmoya1401
    @erickmoya1401 7 месяцев назад

    Cant believe we didnt have "params" until now when creating servers. No wonder we had to try gin or other frameworks.

  • @cindrmon
    @cindrmon 7 месяцев назад +1

    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

  • @driyagon
    @driyagon 7 месяцев назад

    As a junior engineer how should I start learning go? Any good resources that would help kickstart my learning?

  • @fayaz2956
    @fayaz2956 7 месяцев назад

    did they change "unused variable" error to warning? 😮

  • @joergw
    @joergw 7 месяцев назад

    should i beginn with go or better rust?

    • @awesome-coding
      @awesome-coding  7 месяцев назад +1

      If you don't have prior development experience you should start with Go.
      Rust is too complex, and you might get discouraged.

  • @staynjohnson4221
    @staynjohnson4221 7 месяцев назад

    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 ?

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      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?

  • @amit_go
    @amit_go 7 месяцев назад +1

    I ❤ Go

  • @bulf810
    @bulf810 7 месяцев назад

    Where are you getting the data for top langauges of 2023?

    • @awesome-coding
      @awesome-coding  7 месяцев назад +1

      State of Octoverse - github.blog/2023-11-08-the-state-of-open-source-and-ai/

  • @crab-cake
    @crab-cake 7 месяцев назад

    do you have a link to the release notes for the http std library?

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      I apologise - I forgot to link it.
      Here are the release notes: go.dev/doc/go1.22

  • @peterszarvas94
    @peterszarvas94 7 месяцев назад

    I love how Awesome is transforming into a Go dev 👌

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      😅 You can't stay in the Java hell forever, and JS is not really a language, right? 😂✌️

  • @ReRubis
    @ReRubis 7 месяцев назад

    Are exceptions still returned as a function result?

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      They are actually called errors, and yes, they are built-in into the language.

    • @ReRubis
      @ReRubis 7 месяцев назад

      @@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.

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      @@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 😅

  • @bopon4090
    @bopon4090 7 месяцев назад

    what extension gave you that globe icon in every url?

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      That's the default behaviour in IntelliJ IDEA.

    • @bopon4090
      @bopon4090 7 месяцев назад

      Ohh, i thought you were using vscode

  • @frhazz
    @frhazz 7 месяцев назад

    Any good ressources to recommend to learn Go?

    • @awesome-coding
      @awesome-coding  7 месяцев назад +1

      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

    • @frhazz
      @frhazz 7 месяцев назад

      @@awesome-coding thank you! I'll take a look at it this weekend. Really appreciate your videos

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      @@frhazz Good luck!

  • @dejangegic
    @dejangegic 7 месяцев назад

    Every day is a good day to learn Go

  • @j.r.r.tolkien8724
    @j.r.r.tolkien8724 7 месяцев назад

    Nice.

  • @mrlectus
    @mrlectus 7 месяцев назад

    am still getting ccc

    • @awesome-coding
      @awesome-coding  7 месяцев назад

      Make sure you have the 1.22 version in your go.mod file.

    • @mrlectus
      @mrlectus 7 месяцев назад

      yeah, this was it!@@awesome-coding

  • @muhammadshefain6073
    @muhammadshefain6073 7 месяцев назад

    Love your videos

  • @hahabanero
    @hahabanero 7 месяцев назад +6

    Nah, it's a good year to learn Rust.

    • @awesome-coding
      @awesome-coding  7 месяцев назад +8

      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.

    • @rw_panic0_0
      @rw_panic0_0 7 месяцев назад

      can you please shut up with your Rust already? Has anybody asked anything about Rust here?

    • @merotuts9819
      @merotuts9819 7 месяцев назад

      that's like exactly my current state 😅@@awesome-coding

    • @hahabanero
      @hahabanero 7 месяцев назад

      @@rw_panic0_0 jeez, dude :D I just stated a fact - I am learning Go, but it will be definitely year of Rust.

    • @rw_panic0_0
      @rw_panic0_0 7 месяцев назад

      @@hahabanero damn, sorry, I'm getting aggressive on the internet sometimes, maybe I gotta go breathe some air..

  • @utkua
    @utkua 7 месяцев назад

    Please do not learn go, I don't want it to turn into a Python.