Beginners Should Think Differently When Writing Golang
92,114
Published 2023-09-04
βΊ Exclusive Lessons, Mentorship, And Videos π www.patreon.com/anthonygg_
βΊ Enjoy a 50% Discount on My Golang Course π fulltimegodev.com/
βΊ Learn how I became a self-taught software engineer πfulltimegodev.com/#mystory
βΊ Follow me on Twitter π twitter.com/anthdm
βΊ Follow me on GitHub π github.com/anthdm
SUBSCRIBE OR NO MARGARITAS
βββ¦βββ¦ββββ¦ββ¦β¦β¦β¦ββββ
βββ£βββββ£ββ£ββ£ββ£βββ£ββ£
β βββββββ ββββ£βββββββ£
βββ©βββ©ββ©ββ©ββ©β
All Comments (21)
-
βΊ Join my Discord community for free education π discord.com/invite/Ac7CWREe58 βΊ Exclusive Lessons, Mentorship, And Videos π www.patreon.com/anthonygg_ βΊ 50% OFF on my Golang course π fulltimegodev.com/ Thanks for watching
-
Good explanation. As a note to others still confused, structs are passed by value by default in Go (what Anthony means by copy; it's not the original, remember that) and thus when we create a pointer we have a reference to the memory, which will not be cleared with the function stack.
-
Dude⦠thank you so much for this, cause I literally asked you about this yesterday and today you have a video on it. God bless man!
-
For anyone looking to better understand Go, I'd recommend implementing OOP in pure C. Structs are essentially wrappers that hold data so you can easily manipulate related information. Methods are just functions with an inferred argument, and access modifiers are just structs that forward method calls to internal structs.
-
Wish this video existed when I first started writing Go. Really well done and easy to understand for OOP programmers starting Go!
-
This was the first in a series of big breakthroughs for me using GO. Thank you, Anthony!
-
Thnak you for your content! Always useful videos. Keep up the good work! π
-
Your examples made my confusions alot clear, ty alot <3
-
I struggled to understand pointers and your explanation was mind opening. Kudos.
-
The structs in Go, C, Rust are just the data. In memory there only exists the data. In python and JavaScript each piece of object comes with the data just as the previous language, BUT it also has a bunch of other data that is not what u declared, for example a pointer to its class and the methods. For python for example it even holds onto the methods. 1st type of Language: [an object] - field 1 - field 2 And then somewhere else you have: - function 1 that takes in the type of struct as an argument Whereas the 2nd types of languages: [an object] - field 1 - field 2 - method 1 - method 2 - class metadata β¦.. This roughly can be what u can imagine the general differences
-
Loved it, you cleared it up pretty well! Kudos to you!
-
Short explanation: It's like C
-
One thing that I like about hanging functions off of structs is that code bases are far more discoverable via lsp
-
I come from a Python background. When I started learning Go, I found myself constantly comparing its features with Python, which made my understanding a bit difficult. However, this video completely changed my perspective on how I should approach learning Golang.π
-
I enjoyed the way you explained for better understanding. Thanks!!
-
I realy learned alot from you thank you so much! keep up the good work!
-
I saw a comment saying interfaces, i think you should show when to use interfaces and methods. Good video.
-
Great explainer video!! Keep up the good work!!
-
Just fumbled around about this topic and the algorithm bless me with this vid. Thanks!
-
Fabulous tip! If I understood it correctly⦠It reminds me of Python programming when I need to think about dictionaries; on Bash, I think about IFS (word handling via word-splitting).