Comma ok syntax and packages in golang

  Рет қаралды 69,251

Hitesh Choudhary

Hitesh Choudhary

Күн бұрын

Пікірлер: 46
@SriHarshaChilakapati
@SriHarshaChilakapati 3 жыл бұрын
Fantastic series as always Hitesh! Just as an addition, this ok comma error syntax has its roots in pure FP, and is extensively used in other languages like Haskell, PureScript, Elm, etc., One can also see this used extensively in NodeJS functions, especially the ones sent to Promises, or the ones from FS module. In those languages, the return value is actually wrapped in an Either monad, which, practically put, is a data constructor that constructs a type using two values of the success type or an error type. Either this or that. The good thing about this is, at least in Haskell and PureScript, you cannot just ignore the error. You are forced to handle the case in a case match. If you don't, then your function will become a partial function which cannot be invoked. This ensures that no hard crashes occur in programs. Go seems to have borrowed this concept from there, but it is also allowing to discard the error (I call _ as the discard operator). While this is convenient for the programmer, it can cause bugs at runtime if not careful.
@HiteshCodeLab
@HiteshCodeLab 3 жыл бұрын
Thanks for the insight
@morinorabadi2441
@morinorabadi2441 3 жыл бұрын
I try to learn golang many times and the result was so depressing but whit this series is fantastic I finely find i an easy and powerful way to learn this language thanks a lot Hitesh
@tusharsingh1915
@tusharsingh1915 10 ай бұрын
Thankyou Hitesh Sir for providing us the free quality content. Love from Ghaziabad❤
@sayan8587
@sayan8587 3 жыл бұрын
Hi Hitesh, have you come across the following error? gopls currently requires one module per workspace folder. Please open C:\Users\Desktop\Go\LCO\02userinput as a separate workspace folder. This is happening whenever I'm creating a new folder under LCO folder
@deveshsingh7257
@deveshsingh7257 3 жыл бұрын
please think of this feature on your site: After selecting 720p on a video ,when another video starts it have auto quality not my selected one that irritates me everytime.
@projectoswald8275
@projectoswald8275 3 жыл бұрын
It would be nice if you could demonstrate fmt.Scanf() as well 🙂
@kwesikayofficial3078
@kwesikayofficial3078 6 ай бұрын
scan can't accept multiple input
@kelechiduru962
@kelechiduru962 Жыл бұрын
Thank you, Hitesh. I'm becoming your biggest fan.
@bosesj
@bosesj 11 ай бұрын
why use `bufio`, fmt.Scanf also does the job pretty well, is there any other reasons like development related something? If so, what is that?
@kwesikayofficial3078
@kwesikayofficial3078 6 ай бұрын
scan can't accept multiple input
@TheAnimeFan1109
@TheAnimeFan1109 3 ай бұрын
Great series as always!!!
@subhojitghosh6761
@subhojitghosh6761 3 жыл бұрын
Enjoying the series ❤️
@vaibhavpatil4610
@vaibhavpatil4610 Жыл бұрын
Hello Sir, thanks for these Golang Series, Helped a lot to learn GOlang , also Please can you Make also the Series on the Golang Frameworks such as Gin Gonic
@ghazanfarali1891
@ghazanfarali1891 3 жыл бұрын
Very well explained and concise. Love from Pakistan
@swapniljain3490
@swapniljain3490 3 жыл бұрын
Loving the series
@rns10
@rns10 3 жыл бұрын
I am getting error on package main line gopls requires a module at the root of your workspace. Can any one help in removing this
@ganeshbirajdar4382
@ganeshbirajdar4382 3 жыл бұрын
paste this ""gopls": { "experimentalWorkspaceModule": true, }" in your settings.json
@abhishekjha1064
@abhishekjha1064 2 жыл бұрын
Great series Hitesh!
@arv2op308
@arv2op308 5 ай бұрын
Fmt Also Provides Scan Methods So Can't we use them also?
@Jock3R87
@Jock3R87 Жыл бұрын
Hey mate.. thanks for such wonderful series. However want to understand can I install Go on my M1 macbook pro?
@NathanielBabalola
@NathanielBabalola 3 жыл бұрын
The previous video, there was no discussion on Runes. or what video are you talking about
@ayushdedhia25
@ayushdedhia25 3 жыл бұрын
Hello sir, I wanna know that, do golang have good community support? By the way I'm loving the golang series ❤️😊
@zuhaibullahbaig
@zuhaibullahbaig 2 жыл бұрын
yup
@abhinavkumar848
@abhinavkumar848 2 жыл бұрын
"gopls requires a module at the root of your workspace." This error is coming again and again on Package main line, can anyone help!
@siddhantchavan1370
@siddhantchavan1370 Жыл бұрын
have you initialized the module?
@rahulpradeep660
@rahulpradeep660 9 ай бұрын
Why not use fmt Scan?
@keyurbarot8869
@keyurbarot8869 3 жыл бұрын
Next up are the conversions!! The series is getting Interesting !!
@zeeshansafdar8608
@zeeshansafdar8608 3 жыл бұрын
Very well explained.
@abhaytiwari6411
@abhaytiwari6411 3 жыл бұрын
If I write input as a _ then how will I print it
@selfdevelopment7821
@selfdevelopment7821 3 жыл бұрын
it will work same how you declare in variable print statement normally
@md.redwanhossain8822
@md.redwanhossain8822 2 жыл бұрын
isn't it more simple with fmt.Scan method?
@sanjaygatne1424
@sanjaygatne1424 3 жыл бұрын
what is err err. or is it a typo.
@abdulhamidkhorajiya2256
@abdulhamidkhorajiya2256 3 жыл бұрын
First like and then watching
@rajvardhanjagtap6843
@rajvardhanjagtap6843 Жыл бұрын
Why don't we use scanln
@pranav_at_yt
@pranav_at_yt 3 жыл бұрын
Plz make a video on open ai code x
@adeshmahatme1988
@adeshmahatme1988 3 жыл бұрын
great
@AbhishekSharma-gg8zz
@AbhishekSharma-gg8zz 3 жыл бұрын
Nc series....
@shkuch1
@shkuch1 3 жыл бұрын
How come you have 650k subs and only 300 views 👀👀👀
@VeereshPatel15
@VeereshPatel15 3 жыл бұрын
Hi, if u dont mine please do videos on 1. Why / when/ what actually frontend/ backend devoloper need for software industry 2. What actually frontend developers do in realtime Scinorio Or when project assigned 3... Realtime frontend development tasks 4.. If project started what are the different tasks need to do--))by the frontend devoloper.. 5..Easy way to to crack any angular interviews with 3+ experience/10lack package ------) )) 6..Top 20 program's to cover entire angular syllabus.----)) 7...Top 10 angular concepts Please explain by taking one example/project 8...what type of skills (soft/technical)really need for industry 9... 4+ experience of frontend devoloper need to update what type of skills. ....
@nagarjunsugavaneswaran
@nagarjunsugavaneswaran 3 жыл бұрын
Learning but bit confused
@chetankachare
@chetankachare 3 жыл бұрын
I felt the same but re-watched it for better understanding and i understood everything when i actually performed alongside the video and that was my 3rd time go for a go
@bhupeshrajpurohit7022
@bhupeshrajpurohit7022 3 жыл бұрын
#Day 6 GoLang
@bhagyajkumarbijukumar3715
@bhagyajkumarbijukumar3715 3 жыл бұрын
first!
@madhu86918
@madhu86918 2 жыл бұрын
it would be nice if you dont say "nice and easy" so much.. sorry haha
@learn_now_dot_sh_28
@learn_now_dot_sh_28 2 жыл бұрын
alternate of trycatch of go is pretty cool and make sense. I just came from javascript.
Conversions in golang
10:33
Hitesh Choudhary
Рет қаралды 57 М.
Variables, types and constants
17:29
Hitesh Choudhary
Рет қаралды 82 М.
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
Каха и дочка
00:28
К-Media
Рет қаралды 3,3 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 5 МЛН
Is Golang Still a Successful Programming Language?
14:41
Melkey
Рет қаралды 12 М.
The secret to making Golang error handling a breeze
13:46
Earthly
Рет қаралды 13 М.
Handling URL in golang
13:43
Hitesh Choudhary
Рет қаралды 35 М.
Go Pointers: When & How To Use Them Efficiently
14:09
Anthony GG
Рет қаралды 88 М.
Concurrency and goroutines in golang
13:18
Hitesh Choudhary
Рет қаралды 44 М.
Concurrency in Go
18:40
Jake Wright
Рет қаралды 623 М.
Golang: The Last Interface Explanation You'll Ever Need
17:58
Flo Woelki
Рет қаралды 24 М.
Vim Tips I Wish I Knew Earlier
23:00
Sebastian Daschner
Рет қаралды 82 М.
How many people are in the changing room? #devil #lilith #funny #shorts
00:39