Golang Tutorial #22 - Interfaces

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

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

  • @michaelroof1969
    @michaelroof1969 2 ปีที่แล้ว +39

    Been programming for 30 years and you have a special gift. You are not only smart, but are able to articulate your thoughts. In my experience, engineers struggle with one or the other. Most don't share the gift of both at your level. Keep shining your light Tim. We hear you.

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

    I'm almost 50 yrs old and I'm impressed how listening to you makes things so easy - I've never had so much fun with any programming language before. Thank you very much! Keep the good work! Cheers! Bye!

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

    @TechWithTim I must say that "You're one of the best teachers, makes me understand everything with less effort"

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

    That was the simplest explanation of interfaces I have seen so far. Kudos for showing examples of usage.

  • @xcvsdxvsx
    @xcvsdxvsx 3 ปีที่แล้ว +4

    I've looked in many other places to try to understand interfaces. They are always like, this is how you make one, this is how you use one, okay next lesson. This is the first place that actually explained it. Thanks, I'm going to pick up from here following your tutorials instead.

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

    It's amazing the way you back-linked concepts to your previous videos on structs & struct methods which are great. A really smart way of execution!

  • @NoBrainCode
    @NoBrainCode 4 ปีที่แล้ว +25

    tim i am waiting to see you post things about projects with golang because you are the best man, your tutorials are incredibles

  • @ivan.angulo
    @ivan.angulo 4 ปีที่แล้ว +3

    I come from JS and wow I finally understand interfaces! I will enjoy the rest of my day.

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

    Man you not only look so handsome but also make good explanations on this go interface.

  • @aashaydhawal7274
    @aashaydhawal7274 ปีที่แล้ว +6

    Probably the best explanation of Interfaces on internet, exactly what I was looking for. Kudos Tim and thanks a ton :)

  • @SakayaNagii
    @SakayaNagii 4 ปีที่แล้ว +19

    When next video? Goroutines, channels and some other things are still left

  • @therealosose
    @therealosose 4 ปีที่แล้ว +48

    Hey Tim I was wondering if you could do a video on projects you can do with golang

    • @arntxy
      @arntxy 3 ปีที่แล้ว +6

      To be honest, basically anything.

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

      Project : Let's cal the area of any circle you want

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

    Tim, thanks for such a great explanation of Go Interfaces! I searched through several videos & articles, and your style of explaining it finally make it clear!!

  • @dimtass
    @dimtass 3 ปีที่แล้ว +39

    After almost 30 years of OOP languages with classes and objects, they managed to make interfaces in a way that's beats everything else in ugliness. That needs balls.

    • @privateger
      @privateger 3 ปีที่แล้ว +6

      It does look bad.

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

      Go is simply just a poor and ugly language.

    • @SJHunter86
      @SJHunter86 3 ปีที่แล้ว +9

      Go is not an OOP language and isn't meant to be used as one.

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

    Great example, this tutorial the best one I found about interface on internet. thanks.

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

    Great series bro. I used it to remember the syntax but now I realized I want to give Rust a try. lol You are a great teacher/presenter, keep it going!

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

    FYI: it helps during the pointer vs. non-pointer examples to run this in main to kinda show the difference: fmt.Printf("fooShapes: %v
    ", fooShapes)

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

    Great tutorial series on Golang. I saw many of your videos while reading the Tour of Go, and few things became clearer on watching these videos. Next is to go for Effective Go. Only thing which I missed in your series is the coverage of Concurrency. Perhaps, if you come back to visit this topic some day in future.

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

    You have a great teaching style... getting to the point while giving examples 👍

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

    Nice, this series was wonderful, I hope you continue this topic :)

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

    Excellent Golang tutorial for beginners. Thanks Tim.

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

    Thanks for demystifying interfaces. Hope for more Go tutorials from you!

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

    Thank Tim, I know more about go lang programming, it's useful

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

    Please post videos on concurrency, go routines and channels, you really explain very well.

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

    looking forward to the rest of the series!

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

    Your way of teaching is amazing. Waiting for concurrency concepts tutorials.

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

    Your tutorials are wonderful, however I want to point to an issue I see with many tutorials and teaching programs, the naming of variables are too general sometimes so it makes it difficult understanding the connections between parts. For example there is an interface named shape and then we name shape as the variable a function receives and then we create a shapes slice and then we do "for _, shape := " so this makes it difficult to understand which ones are connected and not. When studying I tent to create random local names for variables such as "for _, shapeasdf :=" and this helps me focus more.

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

    Thank you, this is what i was looking for.

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

    Hello Tim, Nice tutorial and very helpful. For meet with golang in basic level, I think this tutorial is perfect.

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

    Yeah Tech With Tim is the best

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

    Thank you for the great video, but one crucial remark, in Go structs are not objects and cannot be referred to as objects they are like an envelope of defined data. Thank you

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

    This cleared a lot up for me thank you so much!

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

      Sup 4 hour ago guy!

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

    thank you so much for golang series and making free😊👍

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

    Finally I found, what is the reason for using interface..

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

    Good video, Tim; impressed

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

    rect area :D jokes apart you are an amazing teacher.

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

    Hey, Tim, are you thinking of continuing the playlist?

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

    Great explanation, thank you for this!

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

    Great tutorial!!! Thanks!

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

    Loved it. Thanks!

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

    Great explanation - thanks!

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

    Thank you so much, really appreciate this

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

    "JavaScript doesn't need/have interfaces"
    *Typescript enters in the room*

  • @TheF00L-h4d
    @TheF00L-h4d 2 หลายเดือนก่อน

    Leave it to Tim to take you from zero to programming a chip-8 emulator in a day

  • @li-xuanhong3698
    @li-xuanhong3698 3 ปีที่แล้ว

    Hope this series can be follow up ~

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

    Very edifying. Thank you :)

  • @ffzz42
    @ffzz42 3 ปีที่แล้ว +2

    3:11: "the point of interface is that any type/struct that implements the method defined in the interface is considered of that interface"
    me: wait, you mean any struct that implements the interface must implement the methods defined in the interface right? just like in java or c#?
    *sees the syntax*
    me: WTF

  • @MikeJones-br5pl
    @MikeJones-br5pl 2 ปีที่แล้ว

    bro great video and explanation

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

    Great video! Thanks

  • @SriRam-fk9fq
    @SriRam-fk9fq 3 ปีที่แล้ว

    Good one!

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

    Thanks for the info

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

    Well explained, thanks , you owned my vote & subscribe cheers !

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

    I understood the pointer concept and the use of pointer in normal variables and in methods , but I didn't understand the use of pointer in this interface. Can you please explain that why we want to pass the adress while using interface

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

    Amazing!!!

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

    Thank you so much. it helped me a lot

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

    When will we see more golang videos @Tech With Tim?
    We are waiting eagerly for more videos.

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

    Great tutorial Tim.. Really liked the way you explain.. Can we more advanced tutorial on golang?
    Rest / grpc API in golang... Thanks

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

    Thank you for the lesson! I do wish implementing interfaces was more explicit in Go

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

    Did you stop going to go with go?
    Access mod*** I mean naming,
    asynchronous stuff with e.g. goroutines,
    and project structure, file structure, conventions and so on is missing, would love to see more. :)

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

    thank you

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

    Great video! It feels like GoLang's interface is a convenient form of abstraction? It feels similar to defining a new class in python.

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

    thanks

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

    Will there be goroutines and channels?

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

    Hi Tim, You are the best man, I love your explanation. keep going.

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

    can you please make videos on golang rest api's and advance golang stuff like channels, go routines

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

    Hi, Tim, I have been following your channel for a time now, I am a 13-Year-Old and wanted to know that how do you practice python because I still come across code that is written programmatically also which framework do you use for app development?

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

      Kivy is generally what he uses with python app development or otherwise like Java based android programing

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

      Kivy is used to make mobile apps with Python. If you want to build a web app, you can use something like Django, Flask or Fast API

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

    You should do udemy courses. You have a knack for teaching.

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

    I completed Tutorials videos :). Then What to do Where do I implement this.
    How to implement into projects

  • @RAHULROY-zo6by
    @RAHULROY-zo6by 4 ปีที่แล้ว

    Hii Sir, I have learnt progamming in golang, How to start development side learning in go for building microservices, Rest . Can you please guide me any course or content

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

    I still don't fully get the point of interfaces.
    Why would I want to create an interface if I already added the area() method to the rect and circle structs?

    • @TechWithTim
      @TechWithTim  3 ปีที่แล้ว +2

      You would create an interface so that you can treats all objects that implement the interface like the an instance of the same struct. For example, your function can only take an object of type circle or square if you don’t use an interface. By having an interface you can take a “shape” which means the square and the circle get treated the same, so long as they implement the interface. So you have access to the same method names on each object. Hope that helps!

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

    Now how does generics alter this?

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

    Please make a gui-toutorial.

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

    This is great but you didn't cover scopes.

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

    1. It'd help to organize before making the video (stop repeating yourself), 2. references are not the same as pointers. One last thing: the pointer has that C-stigma thing. Unless necessary, don't bring it up. Modern languages don't need to talk pointers all the time.

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

    could you please continue?

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

    What about empty interfaces?

  • @ko-Daegu
    @ko-Daegu 2 ปีที่แล้ว

    I can think of multiple issues this way we don't know what func got what interfaces thou
    as func doesn't implement it (for example like extending an interface in java)

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

    This example for "interface{}" is overused in most videos and articles with the same variable, function, and struct names. Is it a copy & paste as well or what?

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

      You should at least demonstrate the flipside that "interface{}", as it is the base type of any datatype in Golang.

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

    👍

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

    where to download this code?

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

    sheldon cooper?

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

    Please create open ai gym tutorial next time

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

    do u start golang pro course ?
    is this last video ?

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

    2nd

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

    very nice explanation.