Understanding INTERFACES in GOLANG

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024

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

  • @monsieurutkarsh
    @monsieurutkarsh 4 ปีที่แล้ว +21

    "A value can be more than one type!!" - I will never forget this ;D

  • @ShubhamSauravYT
    @ShubhamSauravYT 4 ปีที่แล้ว +18

    "A value can be of more than one type". Finally starting to understand what interface really is.
    Thank you Professor

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

    very nice clear definition . a value can have more than one type. awsome

  • @iamworstgamer
    @iamworstgamer ปีที่แล้ว +1

    this, this is exactly what interface is, after 100s of videos listening to gibberish, this is the definition I can really understand.

  • @algoriticus
    @algoriticus ปีที่แล้ว

    "KEYWORD" "IDENTIFIER" "TYPE" love it man. Variable and interface declarations can be tricky coming from Python! I know what I'm sleeping to tonight
    "KEYWORD" "IDENTIFIER" "TYPE"!!

    • @algoriticus
      @algoriticus ปีที่แล้ว

      ...clearly this made my day. Thanks man.

  • @sethcenterbar
    @sethcenterbar 4 ปีที่แล้ว +12

    Thanks for the great explanation! Just one question. Can a value be of more than one type?

  • @techindia3602
    @techindia3602 3 ปีที่แล้ว +1

    Gold

  • @shoaibmd4634
    @shoaibmd4634 2 ปีที่แล้ว +1

    Very well explained! Thanks, for this great video.

  • @enkiimuto1041
    @enkiimuto1041 ปีที่แล้ว

    Your video was very clear.

  • @vikas6024
    @vikas6024 4 ปีที่แล้ว +2

    Lit Explanation!!! I Loved it!!!!

  • @ishansharma2214
    @ishansharma2214 5 ปีที่แล้ว +5

    Love your videos and that laugh

  • @vijeth2
    @vijeth2 2 ปีที่แล้ว

    Dr. Yes and moneypenny is a hero, I'd watch that James bond movie! haha

  • @sheruloves9190
    @sheruloves9190 3 ปีที่แล้ว

    Ur teaching style is very cool.. Thanks for the lovely video..

  • @dperique
    @dperique 2 ปีที่แล้ว

    Very good -- helps me understand. And KIT helps me code without having to keep looking it up -- thanks.

  • @junpan2463
    @junpan2463 2 ปีที่แล้ว +1

    A value can be of more than one type

  • @danishd12
    @danishd12 4 ปีที่แล้ว +1

    Loved your humor. What about practice problems? Any pointers!

  • @sm3227
    @sm3227 3 ปีที่แล้ว +1

    Interface mantra: "A value can be of more than one type!!!", Chant it to feel the interface bliss :-D

  • @Jarek.
    @Jarek. 8 หลายเดือนก่อน +1

    Interfaces inheritance in stdlib (or call it "chaining" if you will) is soo confusing. Even in your video, you're talking about io.Writer 9:06 , then seamlessly at 9:28, without a word of explanation jump to ResponseWriter. Even you sounded a bit confused but eventually concluded with meaningless "so Writer allows you to pass anything in"....

  • @jyl4990
    @jyl4990 4 ปีที่แล้ว +1

    "I called human...pretty cool" lol, anyways, great explanation on interface. Thank you for your work.

  • @BryceChudomelka
    @BryceChudomelka 3 ปีที่แล้ว

    You deserve a million likes. TYTY.

  • @hemi519
    @hemi519 ปีที่แล้ว

    made more sense `Hey baby if you got this method then you are my type`

  • @nikta456
    @nikta456 4 ปีที่แล้ว +1

    Keyword, identifier, type= KIT for simplicity (easier to remember)

  •  4 ปีที่แล้ว

    Succinct explanation. Loved it.

  • @Utubewonderful
    @Utubewonderful 4 ปีที่แล้ว +1

    What if i have the same interface in my package & my imported package. Can i use both?

  • @t-distributedkid3825
    @t-distributedkid3825 ปีที่แล้ว

    Why should I even assert when Im already doing the type checking?

  • @gadorcha1154
    @gadorcha1154 3 ปีที่แล้ว

    This was great. But why not demonstrate how you could call the different humans' speak() method inside foo? Wasn't that the point?

  • @kirklincoln4389
    @kirklincoln4389 5 ปีที่แล้ว

    It's interesting that you don't get a compiler error if you have multiple interfaces with the same method. I would have surely thought that it would throw an error but I guess there is freedom within using and declaring methods from interfaces? Really enjoy your videos, they are pretty much the only informative and easy to understand resources for learning, paid and unpaid. Thanks!

  • @sntshkmr60
    @sntshkmr60 4 ปีที่แล้ว

    "A value can be more than one type!" - Is it in the same manner bool in python are instance of int?

  • @JonDisnard
    @JonDisnard 2 ปีที่แล้ว

    Did the person speak() method not get run?

  • @zhipengmei1549
    @zhipengmei1549 4 ปีที่แล้ว

    thx dad

  • @RobertKing
    @RobertKing 4 ปีที่แล้ว

    a value you can be of more than one type :)

  • @guillemgs
    @guillemgs 4 ปีที่แล้ว +1

    morph means form, not change