Go 1.22 is bringing about a new future for the language.

Поділитися
Вставка
  • Опубліковано 1 чер 2024
  • This is perhaps the biggest update since generics.
    Links
    Release Notes: go.dev/doc/go1.22
    ServeMux Proposal: github.com/golang/go/issues/6...
    Become a better developer in 4 minutes: bit.ly/45C7a29 👈
    Join this channel to get access to perks:
    / @dreamsofcode
    Join Discord: / discord
    Join Twitter: / dreamsofcode_io
  • Наука та технологія

КОМЕНТАРІ • 255

  • @XxxX-ek6fx
    @XxxX-ek6fx 3 місяці тому +159

    A video on the profiling feature in go compilation is a must! Anything to learn how to make go run faster

    • @JorgeDB
      @JorgeDB 3 місяці тому +10

      Missed the opportunity to say "make go go faster"

    • @LieberLois
      @LieberLois 3 місяці тому

      Can u elaborate on that? Not aware of tooling apart from pprof

    • @bororobo3805
      @bororobo3805 3 місяці тому +1

      It's already faster. It's you who makes it slow 😂. You're the enemy of your own progress

    •  2 місяці тому

      Performance is always about bang-for-the buck. Your bottlenecks can be anywhere, often in network calls, proxies, database design and inefficient serialization for the type of server-side programs that you typically write in Go. PGO is interesting but adds operational complexity for a meager ~15% of CPU gains if lucky. That's trivial to shave off in most apps, since your average code today is extremely inefficient. You'd be surprised how bad things are, or alternatively surprised how good modern CPUs are at executing shit code, with countless abstraction layers and indirection.

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Great! I'll definitely keep my replies concise and human-like. Here's my response to the comment:
      Thanks for the feedback! 😊 I'll definitely consider creating a video on the profiling feature in Go compilation. It's always great to learn new ways to optimize code for better performance! 🚀

  • @iwolfman37
    @iwolfman37 3 місяці тому +106

    as someone who doesn't like to use third party packages very much, i love the changes they made to the net/http package! i was actually planning to learn how to handle paths like that using the standard library but now they made it sooo easy! XD

    • @mikhailkuznetsov4679
      @mikhailkuznetsov4679 3 місяці тому +5

      stdlib is absolutely the same as any 3rd party package. moreover, you can easily fork, explore and parth 3rd party packages. not something you can do with stdlib. Also explore some parts of stdlib carefully, you will be surprised how shitty, unreadable and full of anti-patterns the code is. Maybe the only advantage is higher level of security (?)

    • @mikhailkuznetsov4679
      @mikhailkuznetsov4679 3 місяці тому +4

      I use go as my main language, but honestly, this instrument is far from being optimal. Many things and design decisions could be done better to improve simplicity, performance and safety. Probably I sound like a Rust fun ...

    • @GreatTaiwan
      @GreatTaiwan 3 місяці тому

      @@mikhailkuznetsov4679is there’s anything that’s equivalent to Java spring in go world ?
      Considering dev a backend (CMS) and now thinking between spring and Go

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому +1

      Thanks for sharing! 😊 The new Net/HTTP package is indeed making it easier to handle paths. Good to know you're enjoying the changes!

    • @BosonCollider
      @BosonCollider 28 днів тому

      ​@@mikhailkuznetsov4679 The one thing that the stdlib is good at is standardizing an interface. The new router is ok-but-not-necessarily-amazing, but its interface is one that can be captured easily in an interface type to write code that works with any router that supports stdlib-like routes, and it will increase the incentive to just make stdlib-compatible middleware instead of having custom types like Gin or Echo which are their own islands.

  • @ccs4321
    @ccs4321 3 місяці тому +31

    Everything on golang is great, The only thing I wish it have is a real enum

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому +1

      Thanks for sharing your thoughts! 🤔 Enum support is a great idea, maybe someday... 😊

  • @AbegazNap
    @AbegazNap 3 місяці тому +101

    a memory profiling video would be amazing

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Awesome idea! 👍 Modal styling added to the list. 💡

  • @dejangegic
    @dejangegic 3 місяці тому +280

    I'm still waiting for arenas. Option of choosing between Manual Memory Management or Garbage Collection in Go would be a game-changer and open a lot of new doors.

    • @kuroxell
      @kuroxell 3 місяці тому +11

      Damn that sounds amazing

    • @kuroxell
      @kuroxell 3 місяці тому +6

      Damn that sounds amazing

    • @clementdato6328
      @clementdato6328 3 місяці тому +34

      For game dev? Seems not viable as Go itself is not oriented to that level of optimization and introducing such goal would inevitably complicate the language. And we know Go’s philosophy is going against such case.

    • @saeedgnu
      @saeedgnu 3 місяці тому +11

      Zig has manual allocator (with defer for de-allocation), I don't think it adds much complexity, granted Zig is much closer to C.
      Go doesn't want to make bad design choices, that's why features like generics came so late.

    • @clementdato6328
      @clementdato6328 3 місяці тому

      @@saeedgnu this. But GC combining this would it be the same simple for the users? How should it behave when other places are still holding references of it. Hmhh, not obvious to me.

  • @codesheep4028
    @codesheep4028 3 місяці тому +1

    That's amazing! Thanks for the content. qq, what do you use to edit your videos? It looks so clean

  • @leopet6815
    @leopet6815 3 місяці тому +4

    YES! The http routing is freaking awesome! I'm right in the middle of a project and since there aren't too many routes I decided to go all standard with it - but this will definitely reduce the number of lines in my code. Great!

  • @jayjay7333
    @jayjay7333 3 місяці тому +1

    Love your content❤.
    Video on pprof would be amazing.

  • @exapsy
    @exapsy 3 місяці тому +3

    that was a very interesting summary! thanks for providing it

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому +1

      Thanks for the kind words! Glad you found the summary helpful.

  • @yassinouakka126
    @yassinouakka126 3 місяці тому +11

    yes❤, the net/http is heck of a change, good how i hate working with external libraries. now everything is compact at least for api serving and routing

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Something went wrong. Please try again or refresh the commment.

  • @peacetothehumanity5558
    @peacetothehumanity5558 3 місяці тому +1

    Cool vid and nice editing what is you flow and tools for creating zoom in and outlining animations around content.
    Thanks

  • @gimmebytes
    @gimmebytes 3 місяці тому +3

    I like the changes to net/http most - but second I really like the style and your voice over on your videos!

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Thanks for the feedback! 😊 Glad you like the changes and the voiceover. 🎙️

  • @rando521
    @rando521 3 місяці тому +46

    i think go is doing everything we want(hype wise) without straying away from its core ideals (simplicity etc) .
    id like some more relatively complex features but Go gets the job done quickly, runs quickly and is a perfect solution for most apps out there.
    and i am looking forward to actually using standard mux,
    its going to be good as it forces some creativity into framework devs for either speed,security,capabilities etc.
    i for 1 might try making something that adds value to the stdlib

    • @JohnSmith-op7ls
      @JohnSmith-op7ls 3 місяці тому +2

      There’s no way it’s the perfect solution for most apps lol

    • @EndikaMT
      @EndikaMT 3 місяці тому +2

      Optional and enums and the language would be almost perfect.

    • @skelaw
      @skelaw 3 місяці тому

      json null handling is awfull

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Great to hear! 😊 Go is doing a great job balancing simplicity and feature-richness. Can't wait to see what you come up with for the stdlib! 💡

  • @ahmedadly
    @ahmedadly 3 місяці тому

    great overview, thank you

  • @adamszalkowski8226
    @adamszalkowski8226 3 місяці тому

    Nice video - thank you!

  • @mr.togrul--9383
    @mr.togrul--9383 3 місяці тому +3

    Amazing love the new http library improvement, havent done much Go web stuff before, but was planning to do in recent future, this will make things much easier

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Thanks for sharing! 😊 The new HTTP library improvements will definitely make web development in Go easier. Good luck with your future projects! 🚀

  • @jongeduard
    @jongeduard 3 місяці тому +16

    Coming from C#, Rust and other languages, I just learned Go recently. It's fascinating to step into it at this moment.
    Go was created as a more procedural language than some other languages and especially with a strong inspiration by the good old C, but now they are adding a lot more functional features and that is great.
    It's actually fine when languages minimize on OOP features in my opinion, but functional features are actually always worth to implement I think. Not that Go was free of it, since it already had anonymous functions and tuples, but implementing things like actual iterators and higher order functions is something different. And proper range loops are also practical here, so that's a good thing too.

    • @mcspud
      @mcspud 3 місяці тому +3

      ^ how to tell someone you don't understand FP without telling them you don't understand FP.

    • @leopet6815
      @leopet6815 3 місяці тому +1

      Because FP is way undervalued - but it really shines with Go. I recently just made a container with only 3 .go files and 727 lines of code all together - and it is a freaking http, gRPC, and websocket server all at the same time, with JWT authroization. Imagine all that in some OOP - it'll have like a million classes (ok, ok, maybe not a million - but you know)

    • @mcspud
      @mcspud 3 місяці тому +1

      @@leopet6815 Go isn't FP by any metric.

    • @leopet6815
      @leopet6815 3 місяці тому

      woops, yeah, I was thinking of "procedural"@@mcspud

    • @jongeduard
      @jongeduard 3 місяці тому +5

      @@mcspud No one here is calling Go actually functional.
      I even said kind of the opposite about Go and started my explanation with how C like it is. It's also more imperative than Rust, which has proper enums.
      However, things like higher order functions (including, map, filter, fold, etc), iterators and tuples still come from functional languages. These are really no classic C features.
      What triggered my attention the most is that they are coming up with a yield construct, which opens lots of possibilities. Iterators and higher order functions in many languages are built based on these.
      Most popular modern languages are pretty much multiple paradigm, and I think that is a good thing.

  • @yakomisar
    @yakomisar 3 місяці тому +1

    Detailed video about the profiling is a must

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 3 місяці тому +2

    the route parameters and methods addition is really cool, will be using that

  • @Lutz64
    @Lutz64 3 місяці тому +1

    I am a bit unfamiliar with go networking std and fiber. what does the new update not change about perfering to use fiber over std library.

  • @SouvikHaldarmustang
    @SouvikHaldarmustang 3 місяці тому +1

    Awesome coverage! Thanks

  • @Gabiup2
    @Gabiup2 2 місяці тому

    I would love to hear more about Profile Guided Optimisations (PGO).

  • @shradhankumar4109
    @shradhankumar4109 3 місяці тому +1

    isn't loop scope change quite close to how let/const and var behave in javascript?

  • @dracsharp
    @dracsharp 3 місяці тому +2

    Go is going from great to amazing.

  • @melvyn99
    @melvyn99 3 місяці тому +1

    Time to refactor some old code of mine that uses Gorilla. Nice summary, thank you :)

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Great, glad you found the summary helpful! 😊 Refactoring old code can be a challenge, but it's worth it in the end. Good luck with your refactoring process! 💻

  • @edwardmurphy440
    @edwardmurphy440 3 місяці тому

    Love the addition of routing in net/http. I literally just wrote my own router to avoid 3rd party code. I looks like I can replace most of it, except the middleware, with the new features in net/http.

  • @michel92777
    @michel92777 3 місяці тому +1

    The editing was *top notch*, great job!

  • @helloworld7796
    @helloworld7796 3 місяці тому

    1.2.2 is awesome! I was using fiber so far, but now, this is so nice!

  • @Lorenzo1938
    @Lorenzo1938 3 місяці тому

    I'm only waiting, now that we have 'iterators', a standard library package with chainable functional such as map filter reduce. It will be awesome

  • @wcrb15
    @wcrb15 3 місяці тому +1

    Definitely excited about it. I told my wife I definitely feel like a turbo nerd getting excited about a new release of a programming language but here we are 😂

  • @orcofnbu
    @orcofnbu 9 днів тому

    last one is the bomb. i completly agree that lagunages should depend little as possible to 3th party libraries.

  • @ethannnnnnn
    @ethannnnnnn 3 місяці тому +1

    I’d love a video about debugging in go

  • @RichM1967
    @RichM1967 2 місяці тому

    I'd like a deeper dive on the changes.

  • @dmitrygavrovsky5938
    @dmitrygavrovsky5938 3 місяці тому

    video about pprofile would be great! thank you!

  • @migmartin
    @migmartin 3 місяці тому +1

    I currently use the Fiber framework, but with this change in the standard routing library I will have to try it out.

  • @aswath_s
    @aswath_s 3 місяці тому

    I really want to know about profiling applications in production, how the process used to be previously, and what has changed in go 1.22.

  • @Cr0nus
    @Cr0nus 3 місяці тому

    The new routing feature is a great update! 👍

  • @Mikenight120
    @Mikenight120 3 місяці тому +1

    Loving the Go content!!

  • @adel8206
    @adel8206 3 місяці тому +9

    I would love if the net/http server mux had an easy way to chain middleware and mount sub routers. sth like r.Use and r.Mount(path,mux). if we get that, i think will not be using any third party routers anymore.

    • @dominikfrohlich6253
      @dominikfrohlich6253 3 місяці тому +1

      Exactly why I’m still using 3rd party. We need true middleware! But it’ll come eventually.

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Awesome idea! 🤔 Chaining middleware and mounting sub routers would streamline workflows. 🚀

  • @tobyzieglerrr
    @tobyzieglerrr 3 місяці тому

    These are nice incremental changes, but as a newbie gopher i am actually a little shocked about that range issue... i did not even know the semantics yet.
    Why was this fixed so late? Coming from Java i still enjoy me some go and looking forward to learn some of the more complex stuff.
    I rewrite a little tool that i wrote in Java/Spring Boot currently to go... and it is sooo amazing to see how easy and straighforward things can be.

  • @SultaoFeliz
    @SultaoFeliz 3 місяці тому +1

    yes, please do a video of pgo!

  • @IlmariLahti
    @IlmariLahti 3 місяці тому

    This is great! A sane JSON lib next? 😅

  • @RootsterAnon
    @RootsterAnon 3 місяці тому

    I'm happy!

  • @JohnNagleIV
    @JohnNagleIV 3 місяці тому +9

    All I want is percent marked formatting for dates. I don't like using "magic numbers" as the formatting keys.

  • @jorge28624
    @jorge28624 3 місяці тому +1

    thank you for supporting the channel, 5.4 cm!

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Of course! Here's a concise and human-sounding reply:
      Thanks for the support, 5.4 cm! 😊 Your modals will look great with that extra padding. 💕

  • @sammcj2000
    @sammcj2000 3 місяці тому +1

    Profiling might be interesting - especially if it can be automated.

  • @briancbarrow
    @briancbarrow 3 місяці тому

    I would love a video on the profiling feature

  • @nanke1987
    @nanke1987 3 місяці тому

    I am planning to look at go (again) soon and frankly these "new" loop feature worry me. like there was no support for iterators? 😮. I guess this was the price of performance (move slow and fix things?)

  • @kostyan1983
    @kostyan1983 3 місяці тому

    Wow! Thanks! But how do you easily implement for example rate limiter middleware on a pure net/http?

    • @dreamsofcode
      @dreamsofcode  3 місяці тому +3

      You can wrap your handlers in middle-ware! I have a video planned that will show how to do middleware with net/http :)

    • @kostyan1983
      @kostyan1983 3 місяці тому

      I'll be waiting! )@@dreamsofcode

  • @hamzarashid7579
    @hamzarashid7579 3 місяці тому +1

    I was hoping that they would also add "Sum Types"

  • @sporefergieboy10
    @sporefergieboy10 3 місяці тому

    Very cool. I think I’ll stick with C89 and wait for the dust to settle

  • @iamunknownperiod3355
    @iamunknownperiod3355 3 місяці тому

    I was like "this is not that exciting tbh" until the last part. That is huge.

  • @DevlogBill
    @DevlogBill 3 місяці тому

    Hi Dreams of Code, I am very curious about GO and especially now with this update. I am at the moment working with the basics of React and to my limited knowledge became aware that for full stack you need a restful API for your SPA (React.js) library. If I learn GO and the standard Library would this be enough for creating a full stack application? Will I still require a framework like Django or Next for the creation of a crud app? Or can I simple use GO on the backend? My primary focus is React at the moment but I would like to learn some backend and it seems GO is an excellent choice. Could you please share your thoughts? Much appreciated and thanks for the video.

    • @dreamsofcode
      @dreamsofcode  3 місяці тому

      Hey William! If you're using react you might want to check out next.js which is a full stack framework. Otherwise you can use Go for the API backend!
      The net/http package is great for a simple server, you may find it easier to use gin or fiber as a beginner however!

    • @DevlogBill
      @DevlogBill 3 місяці тому

      @@dreamsofcode Thank you for the recommendation! I think I may look into gin or fiber. I just want to spin up quickly a crud app fast. Thanks once again.

    • @DevlogBill
      @DevlogBill 3 місяці тому +1

      @@dreamsofcode Thanks for the excellent advice! I've been reading the documentation on Go, Next.js, Express and Sveltekit and I came to the conclusion that I will try out Golang even though I read the learning curve is harder. But I figured maybe this will work better for me? I will soon find out. Thanks for the tips.

  • @sohanchakraborty7141
    @sohanchakraborty7141 3 місяці тому

    pls make more content in go and its new features

  • @Worldwidegam3r
    @Worldwidegam3r 3 місяці тому +2

    I would like a video on profiling.

  • @x0z59
    @x0z59 3 місяці тому

    Yes! Just yes!

  • @user-qk4tx9jc4m
    @user-qk4tx9jc4m 3 місяці тому

    Awesome❤❤❤

  • @PhonesUnboxing
    @PhonesUnboxing 3 місяці тому

    Awesome🎉

  • @ArcticPrimal
    @ArcticPrimal 3 місяці тому +16

    For me, better error handling similar to rust, null safety and default values are what im hoping for.

    • @drprdcts
      @drprdcts 3 місяці тому +8

      Same. Better error handling is a must.

    • @erikslorenz
      @erikslorenz 3 місяці тому +3

      Just an abbreviated syntax for if != nil return err would do it for me. I don’t mind the syntax when I actually want to handle it in that function

    • @neonmidnight6264
      @neonmidnight6264 3 місяці тому +3

      The nil is so bolted on that divorcing it into a some neat abstraction is highly unlikely at this point. Go seems to insist on fighting crucial advances of programming language development and this one is no exception.

    • @skelaw
      @skelaw 3 місяці тому

      There is nothing wrong with error handling in go. In facts it is pretty good.

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому +1

      Agreed! Rust-like error handling and null safety would be game-changers. 😍

  • @k1lluachan
    @k1lluachan 3 місяці тому

    dose go have a 2D pixel drawing function in its standard library last time i checked go diet not have one

  • @jerseyse410
    @jerseyse410 3 місяці тому +1

    The 1.22 http routing changes are probably going to be the changes that get me to seriously start looking at go for my event listener to replace python

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Thanks for sharing your concerns about the upcoming HTTP routing changes! 🤔 It's understandable to feel uncertain about the impact on your event listener. Have you considered exploring alternative solutions, like using Go instead of Python? 😊

  • @Nerdimo
    @Nerdimo 3 місяці тому

    Non go programmer, but does this code confuse you between the left screens and the right screen? 3:15

  • @samgarg5228
    @samgarg5228 3 місяці тому +1

    The net/http change eliminates the use of chi router in one of my app.

  • @long-live-linux
    @long-live-linux 3 місяці тому +5

    I wonder why Go, which pursues simplicity, adopted generators

    • @askassk
      @askassk 3 місяці тому

      I'm somewhat sceptical of this move. It looks like a nightmare to debug and I don't see how it is much better than things like bufio.Scanner...

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Something went wrong. Please try again or refresh the commment.

  • @brainscott
    @brainscott 2 місяці тому

    OMG the net/http changes are awesome

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Thanks for the feedback! 😊 The updated styling looks great!

  • @olhoTron
    @olhoTron 3 місяці тому +3

    0:53 is yield a new keyword? Or just the name of the variable? 😅

    • @kr30000
      @kr30000 3 місяці тому +1

      keyword

    • @thovinh5386
      @thovinh5386 3 місяці тому +1

      Yeap, it'll be a new keyword.

    • @olhoTron
      @olhoTron 3 місяці тому +4

      No, it will be just convention thankfully, I just checked, range will just check the signature of the value its receiving, if its a function with a specific type signature (and parameter names are not part of the function type) it will use it as a iterator
      Most people will for sure just use "yield" but you can use "yeet" just fine

    • @ArsenGaming
      @ArsenGaming 3 місяці тому +1

      It's not a new keyword. It's the name of a variable passed into the iterator function. You can call it anything you want.

  • @GabrielMoura32
    @GabrielMoura32 3 місяці тому

    Thanks

  • @ayushshukla8413
    @ayushshukla8413 3 місяці тому

    Please help with a detailed video on profiling. Thanks in advance

  • @qzozp
    @qzozp 3 місяці тому +4

    Rangefunc is what I'm waiting on. Having proper iterators will make Go actually worth programming in, imo.

  • @vmohammad
    @vmohammad 3 місяці тому

    cool vid

  • @IgnacioTaranto
    @IgnacioTaranto 3 місяці тому +12

    I really really hope they make `defer` block-scoped...

    • @baxiry.
      @baxiry. 3 місяці тому +1

      Deferred code at the end of the scope may not be able to execute if an error occurs while executing the function.
      Deferral as an implicit function of rantime solves this problem.

    • @metaltyphoon
      @metaltyphoon 3 місяці тому

      @@baxiry.non sense, zig and odin does this an works fines

  • @roman-romadin
    @roman-romadin 3 місяці тому

    Great video. However, plz do not jump between part of code and presentation. And please, please do not zoom in. Plz, use only one scale for the video.

  • @pdox9235
    @pdox9235 2 місяці тому

    Does this new change eliminate the need for a go framework like echo? I just started a project using echo so if I could not use it that might be even better

    • @dreamsofcode
      @dreamsofcode  2 місяці тому

      It does change the need! I have a video coming out in the next week on using net/http entirely :)

  • @petrhanzl8399
    @petrhanzl8399 3 місяці тому

    I love your terminal! Can you share your setup?

    • @dreamsofcode
      @dreamsofcode  3 місяці тому

      Absolutely! I'll be doing so on my other channel. You can find a link on my channel page 😁

    • @petrhanzl8399
      @petrhanzl8399 3 місяці тому

      uhh can you share the link to the chanel, i cannot find it@@dreamsofcode

  • @KripticSilence
    @KripticSilence 3 місяці тому

    How do you edit your videos?

  • @mormantu8561
    @mormantu8561 3 місяці тому +1

    I like the new changs in the http package. But I would have rather seen it more typed with an enum or something instead of being a part of the path.

  • @edvardm4348
    @edvardm4348 3 місяці тому

    as a recent Go dev, I still feel Go is Rust-- (or put the other way, Rust took really good ideas from many languages, including Go, and made everything just a bit better than those other langs, so Rust could be seen as... Go++ with some nifty ML/Haskell influences?)
    There are many, many really good things in Go, not addressing those. What I'm missing is
    - strong stating typing with type inference
    - GADTs
    - pure functions (to be fair, Rust doesn't have those either)
    - being able to not use GC
    - lack of verbosity (errors as return values are better than exceptions, but explicit forced checks really call for functors)
    #hashtagrustenvy

  • @IrohTheGreat
    @IrohTheGreat 3 місяці тому

    Hopefully they still keep this language simple. Thats a hugr selling point for me. I dont want go to be another Java/C#/C++ which only follows trends making big mess around. People coming to Go from Java/C# or other more feature rich languages want more features, but then once language gets bloated are the ones to complain about it

  • @anon_y_mousse
    @anon_y_mousse 3 місяці тому +1

    Every once in a while I learn something new about Go that really disappoints me. Like why have a function which deletes a slice and returns a copy of the new array and still modifies the old one, and in such a weird way. Either adjust its length or don't modify it at all. And for that matter, why does it not have a syntax for handling slicing. The way in which for loops work is wonky to me, both the old scoping rule, and apparently the new behavior. I would expect with a coroutine, or as they call them in Go a goroutine, that it would either be ordered like a stack or a queue. So iterating over the set should either print it backwards or in order, but what you showed was neither. At least they changed the scoping rule to make sense.

  • @ongayijohnian8787
    @ongayijohnian8787 Місяць тому

    Mahn, please do the dadbod plugins for NvChad

  • @FairlySadPanda
    @FairlySadPanda 3 місяці тому

    At last, no more tc := tc in every test case collection I write

  • @mehdiyahiacherif2326
    @mehdiyahiacherif2326 3 місяці тому

    C'mooon i choosed rust over go and now go has a good http library ... (at least my language has good functional tools and iterators right ?)
    choose whatever feels good for your projects buds !

  • @jlshrestha2541
    @jlshrestha2541 3 місяці тому

    hi sir, I m a novice for Go, how to use middleware with this net/http router?

    • @dreamsofcode
      @dreamsofcode  3 місяці тому +2

      I shall do a video on this! Basically you can wrap the handler in your middleware function

  • @rezkycodes
    @rezkycodes 3 місяці тому

    What theme are you using?

  • @apscandy
    @apscandy 3 місяці тому +10

    I’m going to miss my favourite foot gun of go

    • @vaisakhkm783
      @vaisakhkm783 3 місяці тому

      That's when i got stuck in learning go routines, i got so confused when it all printed 10 in stead of 1-10

    • @jongeduard
      @jongeduard 3 місяці тому +1

      C# fixed this same kind of problem with foreach loops many years ago, in 2012, when Go was still very young.
      I think it's a must for any language that supports variable capturing and functional features.
      JavaScript never fixed anything in loops. But that's probably also better, it's still a huge breaking change, even though it fixes issues. And such a thing cannot be done with a language which the entire web depends on.

    • @gokulakrishnanr8414
      @gokulakrishnanr8414 2 місяці тому

      Thanks for sharing your favorite foot gun design! 😊

  • @michelchaghoury9629
    @michelchaghoury9629 3 місяці тому

    what vs code theme are u using

  • @ethannnnnnn
    @ethannnnnnn 3 місяці тому

    I’m really confused. How is it that go, a language seemingly intended for concurrent applications running on web servers, had subpar http methods that don’t even provide query url params?

  • @adrien-barret
    @adrien-barret 3 місяці тому

    mux and others bring tooling for middleware not just rooting so they are still useful

  • @agb2557
    @agb2557 3 місяці тому

    I’ve been getting into Go over the past few weeks, now starting to learn about servers and templating so I’m really glad I don’t have to look to 3rd party libs!

  • @catcatcatcatcatcatcatcatcatca
    @catcatcatcatcatcatcatcatcatca 3 місяці тому

    Am I stupid for being extremely confused by the syntax for yielding a function? It feels like there is one layer of func too many to make sense. I bet it makes more sense for someone experienced with the language.

  • @mahdiyounesi625
    @mahdiyounesi625 3 місяці тому

    Why is the video speed so quick ?

  • @lucy-pero
    @lucy-pero 3 місяці тому

    do they have enums yet?

  • @bradleyrigg7137
    @bradleyrigg7137 3 місяці тому

    Finally sane routing.

  • @exvimmer
    @exvimmer 3 місяці тому +4

    Go is my favorite language. I know C/C++, TypeScript, Python, and JavaScript. None of them feel like Go. I even started changing my C++ codes to have a happy and error path like the way we do it in Go. I think Go has the best design. The only thing that bothers me is memory management, but I guess it's fine.

    • @natescode
      @natescode 3 місяці тому

      Keep going. There are definitely better languages.

  • @Armetron
    @Armetron 3 місяці тому

    Dam I just finished learning Go to start working on production code. Time to relearn it 😅

  • @amady4547
    @amady4547 3 місяці тому

    I want a video about profiling!!!

  • @Senai
    @Senai 3 місяці тому

    How do you animate your videos?

    • @dreamsofcode
      @dreamsofcode  3 місяці тому +2

      This one was mostly Davinci Resolve fusion with a couple in After Effects

    • @Senai
      @Senai 3 місяці тому

      @@dreamsofcode nice thanks for replying, love your videos, keep on keeping on.

  • @tomaszgalkowski8701
    @tomaszgalkowski8701 2 місяці тому

    cmp.Or is the GOAT of this update.

  • @svetogor777
    @svetogor777 3 місяці тому

    super

  • @GoogleIsErratas
    @GoogleIsErratas 3 місяці тому

    I'm still waiting for the missing containers