Blocks, Procs, and Lambda Functions in Ruby

Sdílet
Vložit
  • čas přidán 29. 05. 2023
  • Today we're gonna be taking a look at Blocks, Procs, Lambda functions, Arrow Functions, and ampersands in Ruby!
    Checkout my course(s) at: learn.deanin.com
    Source:
    gist.github.com/Deanout/ef0fc...
    Join this channel to help support these videos:
    / @deanin
    Follow me on social media:
    linktr.ee/deanin
    If you liked this video, please consider subscribing: t.co/RZ4EwP0F2a
    #Deanin #Software #Programming

Komentáře • 10

  • @Deanin
    @Deanin  Před rokem +5

    Quick one that ended up being pretty much a pure Ruby tutorial, so I thought I'd cut out Rails entirely. Hope it helps!
    And let me know if you'd like to see more tutorials for languages like Ruby or JS as a whole, as opposed to Rails specific videos.

    • @dc366
      @dc366 Před rokem

      Yes definitely would like to see more Ruby and JS code. All your content is awesome. Also switching between Ruby, JS and in my case Python becomes a challenge. I tend to forget the syntax.

  • @juanfelipeaguilarmorales9797

    Thank you very much, your yield explanation is the best that I found, I don't know why I did not get it befor but your explanation is really cool.

  • @nekogato8990
    @nekogato8990 Před rokem +1

    Great video for me, a beginner, very concise, very helpful

  • @slimakfoto
    @slimakfoto Před rokem +2

    As always awesome pack of knowledge about ruby! Thanks a lot!

  • @dc366
    @dc366 Před rokem

    Great video. Thank you for explaining. Can you make a video series on rspec and factory bot please?

  • @azizdevfull
    @azizdevfull Před rokem +1

    Amazing : )

  • @kirk7784
    @kirk7784 Před rokem

    This is awesome and it improved my understanding of these concepts. But when would you use a lambda vs a proc? They seem so similar.

    • @MarceloAlarcon-tx6qe
      @MarceloAlarcon-tx6qe Před 6 měsíci +1

      When you need to control the argument that you pass, you should use lambda otherwise use proc.

  • @mycode0
    @mycode0 Před rokem

    Thank you for doing this,but in my opinion people already know the syntax if you want to be useful for beginners you should try to explain what is a block, lambda ect. The syntax of things can be Googled for 10 seconds no one needs to watch 12 minute videos for this.
    Try to explain what does things do when to use one and not the other put short description of what they are and so on. Again thank you for even doing ruby tutorials in this case I just don't see what someone can learn from this video other than the syntax of something, but in this case they could also just Google it.
    That's just my opinion of course, if I didn't know what a lambda is or block is this video would not have helped me understand that at the end.