Excellent video, appreciate the example of Request and ResponseWriter. You're spot on that pointers are simple in concept but the tricky part is understanding why should this thing be a pointer, and not this other thing
@TomDowsTech Just a small correction, In the video, you mentioned referencing &a by just using *a. That would be correct in case If that would have been a pointer variable. Since, a is a value type variable from the example you have shown here, the dereferencing should be *&a
The fact that the editor doesn’t warn when trying to access a potentially nil pointer makes me miss typescript. Are you saying all structs should just have some internal value you use to know if the thing was set or not? Like an isInitalized true bool?
I'm not sure I understand the question, but everything has default values, see this playground: go.dev/play/p/qCJQAwYbCID I should do a video on what you posted on twitter the other day about no required values on a struct. It would be a nice feature but there's ways to construct the program so you don't really need it.
@@dhruvsaxena8254 you can't get your editor to tell you that it's required, but you can use the builder pattern and either return, or panic in the build method if a field is missing.
@@TomDoesTech want to get into backend and actually also looking for a job,I have tried both but i really want to stick to one and go deeper into it, what do you suggest?
@@jalalle1995 do you have some kind of programming complex that the only thing you can write when the conversation is about the Go language is that in other languages are like this and like that? Seriously, who cares? Grow up boy!
this is great for clearifyiing the doubts.
great explanation ! found it very helpful
Excellent video, appreciate the example of Request and ResponseWriter. You're spot on that pointers are simple in concept but the tricky part is understanding why should this thing be a pointer, and not this other thing
Great video, pointers take some time to get your head around.
Editing goof around 4:20 lol
Don't point it out lol 😂
😀 I actually enjoyed it. It shows there is always a process to perfection 🥰
Thank you for the great explanation.
Great tutorial!
Super explanation thanks
@TomDowsTech Just a small correction, In the video, you mentioned referencing &a by just using *a. That would be correct in case If that would have been a pointer variable. Since, a is a value type variable from the example you have shown here, the dereferencing should be *&a
The fact that the editor doesn’t warn when trying to access a potentially nil pointer makes me miss typescript. Are you saying all structs should just have some internal value you use to know if the thing was set or not? Like an isInitalized true bool?
I'm not sure I understand the question, but everything has default values, see this playground: go.dev/play/p/qCJQAwYbCID
I should do a video on what you posted on twitter the other day about no required values on a struct. It would be a nice feature but there's ways to construct the program so you don't really need it.
Hi Tom, can you please share some ways to handle the construction with having the required check,
@@dhruvsaxena8254 you can't get your editor to tell you that it's required, but you can use the builder pattern and either return, or panic in the build method if a field is missing.
Well explained. I'm having the same issue with interfaces. I don' t when and why to use them. Please make a tutorial on this. Thanks.
Should i learn node js or go, iam so confused?
Are you trying to get a job? JavaScript
@@TomDoesTech want to get into backend and actually also looking for a job,I have tried both but i really want to stick to one and go deeper into it, what do you suggest?
@@avg_user-dd2yb I think your chances of getting a job are higher if you focus on node
Nice video
Cool next goroutine and concurrency?
Yeah, I think that's a good idea
It is a great pity that such a pleasant language as Go is not null safety.... :(
To be honest, it's rare that I come across these issues. That's why I suggest to not use pointers to make properties optional
It's more common in js where everything is nullable
@@jalalle1995 We're talking about Go, so stop getting unhealthily excited about JavaScript and making empty comments about it.
@@coder_one let me rephrase it, null bugs are more common in languages where everything is nullable
@@jalalle1995 do you have some kind of programming complex that the only thing you can write when the conversation is about the Go language is that in other languages are like this and like that? Seriously, who cares? Grow up boy!