Тёмный

Go (Golang) Tutorial #14 - Pointers 

Net Ninja
Подписаться 1,6 млн
Просмотров 38 тыс.
50% 1

Опубликовано:

 

26 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 52   
@klirmio21
@klirmio21 7 месяцев назад
Bro, I would have never known that I will finally understand how pointers, reference and dereference works by watching a Go tutorial.! (I am a JS dev). Thank you!
@samdimahmood9047
@samdimahmood9047 2 года назад
Omg! I learned pointers in my first year of university using C and never understood it completely or how it worked under the hood. You have made a difficult topic into an easier concept. Thank you for your content and the hard work you put in behind the scenes.
@NetNinja
@NetNinja 2 года назад
That's great to hear Samira :) thanks for your support
@thegreatestdemon1288
@thegreatestdemon1288 9 месяцев назад
Al-Adab Al-Mufrad 1183 It is related that Abu Hurayra said, "I never sae al-Hasan without my eyes overflowing with tears. That is because the Prophet, may Allah bless him and grant him peace, went out one day and he found me in the mosque. He took my hand and I went along with him. He did not speak to me until we reached the market of Banu Qaynuqa'. He walked around it and looked. Then he left and I left with him until we reached the mosque. He sat down and wrapped himself in his garment. Then he said, 'Where is the little one? Call the little one to me.' Hasan came running and jumped into his lap. Then he put his hand in his beard. Then the Prophet, may Allah bless him and grant him peace, opened his mouth and put his mouth in his mouth. Then he said, O Allah, I love him, so love him and the one who loves him!'"
@PrashantGadhiya-l7u
@PrashantGadhiya-l7u 4 месяца назад
Worlds best example of pointer and memory allocation. Thanks
@arsil_
@arsil_ 3 года назад
Thanks a ton!! all your videos about programming / framework are golds!!
@IvanBahdanau
@IvanBahdanau 7 месяцев назад
Awesome video, I enjoyed it a lot and learned a lot. At 8:30-ish I'd changed the diagram a bit such that the arrow from the "[pointer] under 0x0002" to be pointing to 0x0001 and not to value "tifa". This way it would be a bit more accurate and clearer as 0x0002 and 0x0003 will be pointing to the same address 0x0001.
@michaelsarfo2345
@michaelsarfo2345 2 года назад
i doubt you will see this but, i was so clueless with pointers and what their general purpose was, but this just saved me a BUNCH. tysm!
@mysteroic595
@mysteroic595 3 месяца назад
Very clear explanation! Thank you. I loved the FF7 reference ❤
@NetNinja
@NetNinja 3 месяца назад
Aha! Glad it was helpful! :) thanks for watching
@yeyintaung9837
@yeyintaung9837 7 месяцев назад
Very nice and clear explanation with great examples .U are a great teacher
@NetNinja
@NetNinja 7 месяцев назад
Thank you!!
@che_coelho
@che_coelho 2 года назад
This is awesome. Great CS for a 9 min video
@dragoran149
@dragoran149 3 года назад
I think you should add also interface types to the pointer group, but I guess, you'll handle them in a seperate video, because you can do so much with them.
@haroldobasi2545
@haroldobasi2545 4 месяца назад
using the ascii diagram to explain the pointer made a world of difference
@pss_crs
@pss_crs 3 года назад
If you understand Pointers, All after that is easy. And here is the easiest way to explain thanks gang, can you cover this. Functions (specifically closures) Interfaces And the Concurrency in golang.
@maximsbeyti1224
@maximsbeyti1224 2 года назад
This dude is underrated
@mahajanchetan
@mahajanchetan 3 года назад
remembering the old college days after viewing this video
@John-hz8si
@John-hz8si 5 месяцев назад
i think i'm enjoying pointers way too much
@thewebartisan7908
@thewebartisan7908 3 года назад
Thank you so much for the tuts, would like to also do something on elixir after go
@lipi6535
@lipi6535 3 года назад
Awesome as usual
@farstep4011
@farstep4011 2 года назад
Thanks a lot! It was really easy to understand.
@PanTek-r8g
@PanTek-r8g 16 дней назад
Great series Ninja. It is really helping me. Running Go repl (yaegi) is also a great way to play with concepts
@NetNinja
@NetNinja 15 дней назад
Great to know :) thanks for watching!
@PanTek-r8g
@PanTek-r8g 15 дней назад
@@NetNinja Your explanations of how pointers & memory work are spot on. All very lucid. (btw, Gore seems better than Yaegi as it has completions)
@smokecrack520
@smokecrack520 Год назад
my Uni professors need to learn how to teach from you :)
@softwaredeveloperlessons
@softwaredeveloperlessons 4 месяца назад
Thank you very much bro
@ihsanZed
@ihsanZed 5 месяцев назад
crystal clear
@adobezgaca
@adobezgaca 8 месяцев назад
You're a damn legend
@kaunghtethein3322
@kaunghtethein3322 6 месяцев назад
Thanks very much
@NetNinja
@NetNinja 6 месяцев назад
Thanks for watching!
@aeggeska1
@aeggeska1 Месяц назад
What are "memory locations"?
@xstrong4
@xstrong4 2 месяца назад
Best ever
@NetNinja
@NetNinja 2 месяца назад
@adeniyitaofik3832
@adeniyitaofik3832 5 месяцев назад
whats the usefulness of pointers in reference to performance
@pietrosanchez7484
@pietrosanchez7484 4 месяца назад
One handy use of this is for passing around huge structs you. By using pointers you won't consume more memory by having the compiler create a copy of the struct. Consequently, this will potentially speed up performance because the struct doesn't have copies that need to be garbage collected after it becomes out of scope. I recommend not thinking too much about performance when it comes to pointers, it's far more likely you need to consider using it because you want to mutate the value at the pointer rather than for performance reasons.
@adeniyitaofik3832
@adeniyitaofik3832 4 месяца назад
@pietrodsanchez7484 thanks
@adeniyitaofik3832
@adeniyitaofik3832 Месяц назад
@@pietrosanchez7484 thanks a lot
@NakMs
@NakMs 11 месяцев назад
I'm curious how the pointer save the memory because when it pass the pointer it's also have to reserve memory to store pointer into the memory anyway?
@lucabaxter4002
@lucabaxter4002 10 месяцев назад
Cause they are generally lighter, think about this scenario, if you have a name := "mario" or a novel := "lorem ipsum, lorem ipsum, lorem ipsum etc..." and a pointer to those, in the first case you might not need it cause is just a short string and you can copy it easily, but in the second case, copy it all the time can be expensive, so in that case a pointer does makes sense, even if it does reserve memory for the pointer is always less memory than copying the whole novel on each function call.
@vb_gh
@vb_gh 5 месяцев назад
@@lucabaxter4002 nice explanation. Thank you.
@pyakz6474
@pyakz6474 2 года назад
I dont know if this is right feeling but i feel like golang is becoming easy every time i try to learn it. Last time i cant even understand modules But yesterday it suddenly sinked in 🤣
@RishabhDeepSingh
@RishabhDeepSingh 3 года назад
can't we pass it like update(x &string) like we do in c++?
@brothercaleb
@brothercaleb 3 года назад
I don’t see why not. But bear in mind that ampersand points to memory address and not value itself. If you want actual value then replace ampersand with an asterisk 👍🏾
@m4saurabh
@m4saurabh 3 года назад
What about apollographql.
@thachnnguyen
@thachnnguyen 2 года назад
Missing the point of pointer in Go. Explained it just like a C pointer. Really?
@gururajmoger8649
@gururajmoger8649 3 года назад
Pls explain angular with behaviour subject.. Rxjs.. ngrx🙏👍
@SaiyanJin85
@SaiyanJin85 2 месяца назад
Cudos for referencing (no pun intended) to ff 7 😂
@MrTatooland
@MrTatooland 11 дней назад
I understand the concept but fail to understand how this can be useful in a real case scenario...
@layhoutchea3341
@layhoutchea3341 3 года назад
feel like im studying c language again...
@tommyeagen3763
@tommyeagen3763 3 года назад
this is just like C lol
@hometablet1
@hometablet1 9 месяцев назад
Again, video is great but that screen scrolling makes me dizzy. Please do it better