justforfunc #18: understanding Go's type aliases

  Рет қаралды 26,336

justforfunc: Programming in Go

justforfunc: Programming in Go

Күн бұрын

Пікірлер: 42
@marksaravi7160
@marksaravi7160 3 жыл бұрын
Your channel is one of the best things I ever found in internet. Thanks so much.
@AlexanderDemin
@AlexanderDemin Жыл бұрын
What a great episode! You just did grind everything to the bits! Thanks.
@paulyeoh4266
@paulyeoh4266 6 жыл бұрын
Thanks Francesc for your invaluable videos, an integral part of my continuous learning of this fantastic programming language.
@theyruinedyoutubeagain
@theyruinedyoutubeagain 7 жыл бұрын
19:30 I have the same damn issue with vscode xD Always have to move shit around after I create it. I absolutely love it though, and credit you fully for making me switch to it. Good episode by the way (as always)!
@IvanPortoCarreroBE
@IvanPortoCarreroBE 7 жыл бұрын
select a file in the root and then create the folder, no more moving around
@meowmeow70
@meowmeow70 7 жыл бұрын
thanks Francesc. clear explanation and learned a lot. Could you do episode about package, dependency management strategy for the relatively large project?
@JustForFunc
@JustForFunc 7 жыл бұрын
I was planning on doing an episode on dep ... maybe the time has come!
@meowmeow70
@meowmeow70 7 жыл бұрын
Awesome! thanks again for great work.
@mybigbeak
@mybigbeak 7 жыл бұрын
Great episode, I get the same issues recording, I always find the second time is best. Really useful info too. Go aliases. Woo.
@AnthonySBD
@AnthonySBD 7 жыл бұрын
good episode, i wasn't sure how or why id bother to ever use type aliases besides packages changing location / name and this video actually gave me some useful scenarios where it can come in handy.
@JustForFunc
@JustForFunc 7 жыл бұрын
glad you liked it! that was totally the goal of the episode :)
@alesresta
@alesresta 7 жыл бұрын
Another great episode! Thank you, Francesc.
@JustForFunc
@JustForFunc 7 жыл бұрын
thanks for watching!
@nexdev09
@nexdev09 7 жыл бұрын
I just found your channel. I really enjoy the videos, keep making them.
@Cutiepie-ky9oh
@Cutiepie-ky9oh 4 жыл бұрын
Why is it that you can print the celsius without calling `c.String()`?
@dksingh04
@dksingh04 6 жыл бұрын
Thanks Francesc, I learned learn a lot from your episodes, keep sharing.
@pmareke
@pmareke 6 жыл бұрын
In the minute 30:55 you finally move the code from the old to the new package but I can't see the difference from it and moving forward without the alias feature. I mean I'm lost because I don't see the benefits or even the possible problems, why you can't move code directly from one package to another via copy-paste? Thanks for your videos by the way, are amazing!
@danielscholz613
@danielscholz613 6 жыл бұрын
It think the trick is that you only want to make changes in one package at a time in terms of continuous integration as he mentioned at some point earlier.
@theearthboundkid
@theearthboundkid 7 жыл бұрын
For channels, I often end up naming a type, just so I can pass groups of things into and out of the channel more easily. With type aliases, it could make more sense to use type chanResults = struct { int; err } or whatever, so that you aren't locking yourself down to one type implementation.
@JustForFunc
@JustForFunc 7 жыл бұрын
I don't see how using an alias in this case would help over normal types.
@johnbalvin5401
@johnbalvin5401 7 жыл бұрын
I dont get why at 2:22 it prints "10.00 C", wouldnt be the code for that at line line 13 like "fmt.Println(c.String())" because thats how you call a method?
@valdeleplace4536
@valdeleplace4536 7 жыл бұрын
Method String is "special" because it makes your type implement fmt.Stringer, so implicitly the String method will be called by fmt.Println. See golang.org/pkg/fmt/#Stringer
@johnbalvin5401
@johnbalvin5401 7 жыл бұрын
thank you so much
@bhfaught
@bhfaught 7 жыл бұрын
That got me too. Justforfunc should have thrown in a little aside to let viewers know about Stringer.
@blondie9990
@blondie9990 5 жыл бұрын
Thank you for explaining this, otherwise I would have never understood the point.
@kitgary
@kitgary 7 жыл бұрын
Your VS Code looks beautiful, how can I setup like yours?
@alaypatel7511
@alaypatel7511 6 жыл бұрын
Just out of curiosity is there a way where I could find/print out all alias to a type? Great Episode btw
@buscoopwang8874
@buscoopwang8874 7 жыл бұрын
I really enjoy the videos
@aaronprindle385
@aaronprindle385 6 жыл бұрын
Thanks for making these!
@dansplain2393
@dansplain2393 3 жыл бұрын
I agree that Fahrenheit doesn’t make sense in general. Freezing is zero, period.
@swileniwanow8089
@swileniwanow8089 4 жыл бұрын
I promise you dude, as golang popularity grows this channel will escalate
@niranjangodbole8784
@niranjangodbole8784 7 жыл бұрын
farenheit don't no make any sense to me :D hahaa
@belekabylov
@belekabylov 7 жыл бұрын
Instant like for Farenheits joke.
@13TheGUNNER
@13TheGUNNER 6 жыл бұрын
good example, thanks !!
@greiezer
@greiezer 5 жыл бұрын
The new.Hello func is calling old.Hello, so just dropping the old code at kzbin.info/www/bejne/jJiZYWabbqhgjMk will break the CI-build since we did not copy the old implementation over to new.Hello and remove the call to old.Hello, or did I get that wrong?
@easternsunking255
@easternsunking255 6 жыл бұрын
Great Great episode,
@rraulinio
@rraulinio 6 жыл бұрын
>= 18, btw. Great work, respect!
@DJjetseb
@DJjetseb 7 жыл бұрын
Am I the only one to think that there will be a lot of abuse regarding aliases which will obfuscate the code in end?
@JustForFunc
@JustForFunc 7 жыл бұрын
+Just AGuy I think there's a risk people might try to obfuscate code, but that risk exists pretty much with every feature, and the benefits of type aliases are worth it imo
@DJjetseb
@DJjetseb 7 жыл бұрын
I like the feature too, but I guess we will see what people will do with it.
@MrSnack111
@MrSnack111 7 жыл бұрын
Very usefull, thanks!
@andherium
@andherium 3 жыл бұрын
e dentical
justforfunc #17: contributing to the Go project
42:49
justforfunc: Programming in Go
Рет қаралды 13 М.
justforfunc #19: mastering io.Pipes
41:24
justforfunc: Programming in Go
Рет қаралды 34 М.
Air Sigma Girl #sigma
0:32
Jin and Hattie
Рет қаралды 45 МЛН
ВЛОГ ДИАНА В ТУРЦИИ
1:31:22
Lady Diana VLOG
Рет қаралды 1,2 МЛН
justforfunc #37: sync.Pool from the pool
27:11
justforfunc: Programming in Go
Рет қаралды 17 М.
Level Up Your Golang: 5 Concepts You Need to know
19:22
Flo Woelki
Рет қаралды 17 М.
C++ Super Optimization: 1000X Faster
15:33
Dave's Garage
Рет қаралды 334 М.
Golang: The Last Interface Explanation You'll Ever Need
17:58
Flo Woelki
Рет қаралды 31 М.
justforfunc #22: using the Go execution tracer
35:55
justforfunc: Programming in Go
Рет қаралды 22 М.
This is why Go Channels are awesome
6:06
Web Dev Cody
Рет қаралды 19 М.
Arenas, strings and Scuffed Templates in C
12:28
VoxelRifts
Рет қаралды 104 М.
Golang UK Conference 2016 - Dave Cheney - SOLID Go Design
27:30
GopherCon UK
Рет қаралды 110 М.
Air Sigma Girl #sigma
0:32
Jin and Hattie
Рет қаралды 45 МЛН