Go 1.23: Custom Iterators Explained - Best feature?!

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ม.ค. 2025

ความคิดเห็น • 26

  • @r00ty
    @r00ty หลายเดือนก่อน

    Thank you! I've found a lot of examples out there, but I was able to understand how that works just now

    • @FloWoelki
      @FloWoelki  หลายเดือนก่อน

      That's so awesome to hear :) Glad it helped!

  • @bopon4090
    @bopon4090 4 หลายเดือนก่อน +7

    Its confusing af. All the callback and syntactic sugar kind of hard to understand

  • @siya.abc123
    @siya.abc123 4 หลายเดือนก่อน

    Congratulations on 10K subs sir. I'm happy I was here before this milestone 😊

    • @FloWoelki
      @FloWoelki  4 หลายเดือนก่อน

      Thank you very much! I appreciate that you are part of this journey!

  • @selvamp5775
    @selvamp5775 4 หลายเดือนก่อน +2

    Function inside function inside another function...
    Little confused, hope will get it know.

  • @themannyzaur
    @themannyzaur 4 หลายเดือนก่อน +1

    thank God I'm not the only one confused

  • @Nenad_bZmaj
    @Nenad_bZmaj 2 วันที่ผ่านมา

    What are the iterators used for? Obviously I can iterate trough a slice without them. I can double (or transform in some other way) the value without them. Can I use them to iterate through a struct? If not, I am absolutely clueless why this exists. Perhaps an example that accomplishes something useful, not easily done before, would help understand.

  • @y.m.o6171
    @y.m.o6171 4 หลายเดือนก่อน +1

    pray tell how you are making these videos they are awesome !

  • @LielAlmog
    @LielAlmog 4 หลายเดือนก่อน

    Do you think people will start creating their own iterators for utilities (like iterate over a slice in reversed order) or we’ll see more packages like in JS, where there are many packages that give built in functionalities

    • @FloWoelki
      @FloWoelki  4 หลายเดือนก่อน +1

      Honestly, I do think that some people will create their own iterators for their libraries because they give you a lot of flexibility and developer-friendliness. Clearly, I cannot predict the future, so let's see where it goes :D

  • @RaminRowshan
    @RaminRowshan 2 หลายเดือนก่อน

    Thank you for your video! It would be very helpful if you could also share your code by providing a link in the video description.

  • @fntr
    @fntr 4 หลายเดือนก่อน

    what code editor do you use atm and in this vid?

    • @FloWoelki
      @FloWoelki  4 หลายเดือนก่อน

      I use the Zed Editor :)

  • @rahman9418
    @rahman9418 4 หลายเดือนก่อน

    Are you interested in creating a Udemy course? to teach the go language, because you explained it very well with an interactive video

  • @eddymoreno3818
    @eddymoreno3818 4 หลายเดือนก่อน +7

    the sintaxis is ugly , i prefered it if it was a interface with a HasNext and Next methods or something like that

    • @FloWoelki
      @FloWoelki  4 หลายเดือนก่อน +1

      Yeah, the syntax is just mental :D Something like custom iterators in Rust is way more beautiful than in Go. But yeah, there were also a lot of discussions in the community; let's see where it goes.

    • @flarebear5346
      @flarebear5346 4 หลายเดือนก่อน +2

      The syntax is the way it is because of performance issues when using interfaces. This syntax allows you to use the functionality completely in the stack without needing to access the heap

    • @FloWoelki
      @FloWoelki  4 หลายเดือนก่อน

      @@flarebear5346 Also, I think it might be against the idiomatic practices of Golang. So, Go emphasizes simplicity and directness, avoiding more complex design patterns. But all in all, you will probably most likely won't use iterators that much :D

  • @flipflap4673
    @flipflap4673 4 หลายเดือนก่อน

    Not sure where I read that Golang is a fool proof language, easy to learn for any noob.

    • @gungun974
      @gungun974 4 หลายเดือนก่อน

      @epsigo never really changed, again if you don’t like a feature, just don’t use it.
      The day when Golang will become craps, it’s will be the day of the 2.0 update where old codes will just broke.
      Until them, there are nothing to worry.

    • @slayers2966
      @slayers2966 8 วันที่ผ่านมา

      @@gungun974 yeah, just dont use it. Unless ur boss tells to fix a bug in their custom iterator function. Then good luck not using it, lol.

  • @sm5172
    @sm5172 4 หลายเดือนก่อน +2

    It's like a dog scratching his right ear with his left leg. Terrible syntactic choices, in my opinion.

  • @pookiepats
    @pookiepats 4 หลายเดือนก่อน

    Again, fix the Go Gopher art or this entire playlist is copyright infringement

    • @FloWoelki
      @FloWoelki  4 หลายเดือนก่อน

      Thank you for the information. Would a short notice in the TH-cam description be enough, or what do you recommend?