I learned the Go Programming Language 👩‍💻

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 355

  • @MrC0MPUT3R
    @MrC0MPUT3R 3 месяца назад +1805

    The road to hell is paved with `pip install`

    • @sohigh7433
      @sohigh7433 3 месяца назад +193

      npm install would like to have a word with you

    • @fus3n
      @fus3n 3 месяца назад +30

      Skill issue

    • @saumytiwari7
      @saumytiwari7 3 месяца назад +14

      It is not

    • @awonderfulyoutubechannel9337
      @awonderfulyoutubechannel9337 3 месяца назад +24

      I think never before have I installed pip dependencies without getting at least 2 errors in the process

    • @nickklaver11
      @nickklaver11 3 месяца назад +12

      @@saumytiwari7 one combination of words to prove the contrary: ai tensorflow cuda python packages and the 15+ gb folders

  • @yewo.m
    @yewo.m 3 месяца назад +507

    😂 The sound effects and editing when you mentioned the Python and JS packages situation just had me

    • @bluerie._.3021
      @bluerie._.3021 3 месяца назад +10

      python package add-two-numbers 0.1.1

  • @chrikke
    @chrikke 3 месяца назад +492

    The error handling eliminates try/catch hell. It reduces readabilty because you are actually handling errors

    • @robergroso
      @robergroso 3 месяца назад +42

      "try" bad lot of "if" good

    • @chrikke
      @chrikke 3 месяца назад +57

      @@robergroso yes, exactly.
      Try catch can lead to a lot of nesting in specific scenarios. Go eliminate that. There's many if statements because you are actually error handling in pretty much every scenario.
      I bet most Javascript, or Python devs don't handle errors even 25% of the time, purely because they don't even think about it.

    • @giovane_ps
      @giovane_ps 3 месяца назад +3

      ⁠​⁠@@chrikkeThat is a bit of because the error handling in go is very nice, cause that makes you think on handling possible errors, what in another langs probably you wouldn’t do

    • @driedurchin
      @driedurchin 3 месяца назад +14

      I 100% would agree if rusts question mark operator didn’t exist. Would love something like that in go for the common case

    • @SourceOfViews
      @SourceOfViews 2 месяца назад +9

      It's not between go's version vs exceptions. The Return type has existed for decades now and Go's version is just pretty terrible for a rather new language.

  • @davidgillies620
    @davidgillies620 Месяц назад +28

    It took me five days to learn Go to the point where I was able to create a project that was used in a massive content delivery production environment for five+ years.

    • @himbary
      @himbary Месяц назад

      how much experience do you have?

    • @davidgillies620
      @davidgillies620 Месяц назад +6

      @@himbary Of writing software in general? About 40 years. I'm finding the learning curve for Rust to be a lot steeper - more like C++ when I first started learning that back in 1989 or so.

    • @annekekramer3835
      @annekekramer3835 5 дней назад

      ​@@davidgillies620 If you would recommend a programming language, for someone like me: chemical engineer, mostly wants to use programming to make life easier, like data cleanup, some loops for calculations. It's stuff that I now use VBA for, with the help of co-pilot.
      I'm a very much beginner in programming, again, I mainly use copilot and the record function in Excel at the moment, but I would add programming to my skill set.

    • @pablovaldes2397
      @pablovaldes2397 4 дня назад

      that's about average

    • @guyloser2
      @guyloser2 2 дня назад

      ​@@davidgillies620I was thinking about learning Rust but their foundation 😭

  • @CodeWithRivandra
    @CodeWithRivandra 2 месяца назад +72

    The error handling is pretty great.
    The Lack of packages and comprehensive documentation for beginner is the current issue i think

    • @jensenraylight8011
      @jensenraylight8011 2 месяца назад +13

      some mf stuck at GOPATH and never recover ever since

    • @CodeWithRivandra
      @CodeWithRivandra 2 месяца назад +3

      @@jensenraylight8011 it happened 🤝

    • @phillipanselmo8540
      @phillipanselmo8540 Месяц назад +3

      the reason why there is a lack of packages is because the standard library has 98% of what you need for a web server

    • @MrDpof
      @MrDpof 20 дней назад

      Gopath is no longer an issue.

    • @roccociccone597
      @roccociccone597 16 дней назад

      @@jensenraylight8011 hasn’t been an issue for a while now actually.

  • @odouglascardoso
    @odouglascardoso 3 месяца назад +82

    I code for 16 years, using PHP in the begining and Java most of time. So error handling and concurrency is part of my daily routine. However, I have to agree, error handling in Go is cons and pros at same time. I start thinking I was coding in 80s, then I understood we should never leaver 80s coding style on error handling aspects.

    • @guccigreatness4925
      @guccigreatness4925 2 месяца назад +1

      For younger devs is Java still popular or should newer devs learn python? 🤔

    • @4ngelf
      @4ngelf 2 месяца назад +12

      ​@guccigreatness4925 They should learn how computers work and how we can interact with them through programming. So any language works fine.

    • @alejandrocano88
      @alejandrocano88 2 месяца назад

      @@guccigreatness4925 python or go

    • @rbda8921
      @rbda8921 Месяц назад +5

      Its esy to do a lot of things in python, and its pretty easy to learn too! So.i would recommend C lol

    • @4ngelf
      @4ngelf Месяц назад

      @@rbda8921 C is the best

  • @arbuzow
    @arbuzow 2 месяца назад +16

    I started learning go this month and i love it. My first language was C

  • @chadbekmezian4806
    @chadbekmezian4806 6 дней назад +1

    Describing Go’s stdlib as minimal is wild! It’s got so many packages!

  • @nikkehtine
    @nikkehtine 3 месяца назад +6

    Lack of packages is a good thing in my book, since it encourages you to write your own implementations instead of gluing packages together, while still having the most important ones i.e. web frameworks, Markdown parsers, Raylib, etc.

    • @roccociccone597
      @roccociccone597 16 дней назад

      Exactly. I don’t want it to end like Python or even worse JS where people need a library to do the most basic of tasks.

  • @BigMonkeyKnows
    @BigMonkeyKnows 3 месяца назад +65

    I also use to hate the error handling, but it makes more sense this way. I can’t go back to try/catch.

    • @CodingWithLewis
      @CodingWithLewis  3 месяца назад +12

      hahaha me too. try-catch actually is starting to look worse.

    • @yewo.m
      @yewo.m 3 месяца назад +7

      It's not a binary set of options like that. Like there's also the option of Algebraic Data Types

    • @BigMonkeyKnows
      @BigMonkeyKnows 3 месяца назад +1

      @@yewo.m true, although it still feels largely the same. Although, in Rust the pattern matching still feels like a glorified if statement. I do like it though.

    • @darkmastergraham
      @darkmastergraham Месяц назад

      @@BigMonkeyKnowsthe magic of match and if let patterns is the ability to deconstruct structs and enums. Once you start doing that it feels less like a stand-in for a switch statement.

    • @BigMonkeyKnows
      @BigMonkeyKnows Месяц назад

      @@darkmastergraham you are correct I change my stance on this. Not from Rust, but from Zig. I do love the switch statements and pattern matching far more than Go’s error handling.

  • @hxcuber
    @hxcuber 3 месяца назад +73

    go stdlib is minimal yet so so so powerful

  • @eugeneponomarov7429
    @eugeneponomarov7429 2 месяца назад +2

    Man, go error handling thing is something I’m advocating so hard in js projects. People tend to throw errors on any occasion and then to have a master catch block which is a terrible idea from any side (well it’s good if you don’t want to handle any errors).

  • @user-jchjkitv77896
    @user-jchjkitv77896 2 месяца назад +1

    Recently i started to code in go, wasn't as straightforward to learn as the popular langs but once you ge the hang of it there's no going back i love it

    • @roccociccone597
      @roccociccone597 16 дней назад

      Eh… the syntax itself is very simple. Some concepts are a bit different though.

  • @shapelessed
    @shapelessed 3 месяца назад +1

    I actually prefer errors as values over try/catch. So much that I started using this paradigm in JS as well.
    When you throw, you sometimes forget to catch, and sometimes you don't know where it's caught and how it's handled... Maybe it just throws again and isn't cought at the top... I just prefer the safety of returning errors. Especially since TS lets you safeguard your actual return values so they stay undefined before you handle the returned error.
    Ever since I started doing this, I NEVER had a reference or an uncaught error... Think about that...

  • @ScipiPurr
    @ScipiPurr Месяц назад +1

    The only real issue I have with Go's error handling is Go's error type is basically just a string. If you get an error back from an API that can fail in many different ways (some of which may be recoverable from) you basically have to do string parsing to determine how it should be handled. This can create some flimsy code where you're basically just hoping the vendor doesn't change the error message on you

    • @emilnymann8723
      @emilnymann8723 22 дня назад

      You can define error types on the Error interface, they're just string backed. That doesn't mean you can't use static typing to determine what kind of error was returned. LIke anything, if the vendor implementation is bad, the vendor implementation is bad. That's not the language's fault.

  • @masterchief1520
    @masterchief1520 2 месяца назад +2

    It makes you handle errors as you get it. All script kiddies spending hours to configure IDE. Even the most basic LSPs can give snippets one way or another. How is it verbose? Its readable and straightforward. Anything else is insanely worse. Go principle and most important aspect is keeping it simple. If you're gonna complain about verbosity you should also explain what you think would be better. It doesnt do anything complicated that other languages with error as values do like rust. Concurrency is so easy and it just works OOTB. Comes with toolchain for race analysis, prof, GC inspection. Good luck doing the same in java or any other GC. (GC languages cuz its clear we're talking about backend). Channels are amazing yet so simple. You can learn the whole language and necessary stuff in a day or two. Learning the Go way takes a bit of time but still way better than learning the intricacies of javascript. I urge Nodejs people to check it out. Its 100% worth it. Makes you better programmer.

  • @magiccuttlefish
    @magiccuttlefish 3 месяца назад +18

    kotlin next would be amazing. Its java but better. And its *advertised as 100% java compatible BUT it really sucks so your standered and external libraries are not fun. But use it for general purpose not just android apps

    • @CodingWithLewis
      @CodingWithLewis  3 месяца назад +7

      I hear too many good things about Kotlin. Never gave it a try.

    • @javacrow_
      @javacrow_ 3 месяца назад +1

      I tried it out, unfortunately I don't know how to make a Kotlin window and mess around with graphics, that's probably because it's for mobile apps

    • @magiccuttlefish
      @magiccuttlefish 3 месяца назад

      @@javacrow_ then start small. Kotlin can be used for backends too. Like web apps with ktor

    • @magiccuttlefish
      @magiccuttlefish 3 месяца назад

      @@CodingWithLewis what!?

    • @Darkhorse735
      @Darkhorse735 3 месяца назад

      ​@@javacrow_ You should have tried compose multiplatform

  • @GyroCannon
    @GyroCannon Месяц назад

    Go's error handling to me, as a non-Go programmer, is a lesson on how to make my code more readable in other languages
    In fact, i see a lot of this at my workplace, in our Python services.

  • @marcialabrahantes3369
    @marcialabrahantes3369 15 дней назад

    If Go's concurrency model is more intuitive to you then Python's, you either are doing it wrong or you're only half a layer deep.
    it's much more complicated depending on the pattern you pick (i.e. a pipeline is much more complicated than 'parrallel execution')

  • @CodingWithLewis
    @CodingWithLewis  3 месяца назад +9

    What are you learning right now?

    • @_jakefn_
      @_jakefn_ 3 месяца назад +3

      Working on Bootstrap

    • @MED_Laaguidi
      @MED_Laaguidi 3 месяца назад +7

      c++

    • @sonialucy1
      @sonialucy1 3 месяца назад +1

      Working on some Python automation things

    • @sonialucy1
      @sonialucy1 3 месяца назад

      And learning JavaScript

    • @gerliogames3737
      @gerliogames3737 3 месяца назад +4

      ur mom

  • @CarlosAlvarado04
    @CarlosAlvarado04 11 дней назад

    I’ve learned Go because I work with Kubernetes, I wanted to understand its underlying details.

  • @_hepl
    @_hepl 3 месяца назад +131

    Go? More like goat, like lewis.

    • @CodingWithLewis
      @CodingWithLewis  3 месяца назад +4

      🥰🥰

    • @SakuraScythe
      @SakuraScythe 3 месяца назад +1

      The goat in programming or...?

    • @srdjantrail
      @srdjantrail 3 месяца назад

      ​@@SakuraScythethe goat in f1 😅

    • @SakuraScythe
      @SakuraScythe 3 месяца назад +2

      @@srdjantrail Lewis Hamilton? 😭

    • @srdjantrail
      @srdjantrail 3 месяца назад +1

      @@SakuraScythe yes!

  • @MoehreMoe100
    @MoehreMoe100 3 месяца назад +1

    You should try gleam! It also does Errors as values but in a more elegant way and it can compile to js or Erlang

  • @tjkatz
    @tjkatz 5 дней назад

    Ironically, the Go error handling style is taking over Node/TypeScript now. People are ditching try/catch in favor of returning multiple values (including an optional error) within an object.

  • @scheimong
    @scheimong Месяц назад

    I think it's fair to say that everyone who's used both exception-based and value-based error handling will prefer the latter for anything that is not a throwaway scratch project. It's one very important pillar to Rust's appeal, for example.

  • @leonvolq6179
    @leonvolq6179 2 месяца назад +2

    Refactoring my own code I always find unhandled errors. I'll trade verboseness for good error handling every day.

  • @CristianBilu-q4n
    @CristianBilu-q4n 21 день назад

    Error handling is verbose because in go you actually handle the errors unlike javascript

  • @C_Corpze
    @C_Corpze 2 месяца назад

    You should totally look into the D programming language.
    It's like C++ but easier, more readable and comes with automatic memory management by default (can be disabled/controlled).

  • @ezikhoyo
    @ezikhoyo 3 месяца назад

    I love go, it’s by far my most favorite language of all languages I either really learned or just took a few days to tinker around with. I’m nowadays using it for everything I do, only using Java where I have to (like writing extensions to existing Java apps), or obliviously JavaScript for the web itself (although the GoT(T)H stack is my absolute favorite: Go, Tailwind, optionally Templ instead of the stdlib templates and HTMX. No more JavaScript for 95% of everything and the client decides the state. 1000x more performant than any React or even Svelte).
    The only downside imo really is error handling. I totally understand the why and I would prefer it every day over the way Java does it with try-catches/throws, or JavaScript that just doesn’t have built in errors, but it can get a bit repetitive at points. That’s why I’m so much for the error handler proposal, which basically makes it so that you can set, at any point in your code, a error handler that will handle all errors coming after it. A function returns a value and an error? You would only (unless you wanna handle this one yourself explicitly) do value := myFunc() instead of value, err := myFunc(). If an error is actually returned, the next error handler will be „searched“ and called, so it goes up the stack. If there is one a few lines up or at the beginning of the function, it’ll use that one, if there’s not, it’ll go into the function which has called this function and do the same search there, until it finds an error handler - until it’s at the main function which would then do a panic as no error handler has ever been set. It’s obviously a compile time feature, so it doesn’t actually search through anything, it would just when compiling find where the next one is and basically call that as a closure effectively.
    This way, I could just set a error handler inside my HTTP handler, then do a bunch of things such as requesting database, then another service, call some API, just many things that could error and if any of these does, the HTTP request couldn’t be completed anyways and therefore the error handler would just send a simple 500 internal server error status to the client. And, as I said, you could at any point just set a new handler, for example to handle your microservice errors differently when calling them, so that e.g. you could (re)connect to a different instance, retry the request and then successfully return what you wanted. And after that function returns, the microservice handler is no longer in scope and any further errors would be handled by the HTTP one.
    But, and that’s the whole point about go, if my only complain is that error handling is better than in any other language, but yet not perfect, then the language is doing something right. From my knowledge Go has the biggest std by far compared to every other language. For most of my projects I don’t really use external libraries, because you don’t have to. Dependency injection? Exists as per language spec, no library needed. Compressing files, modifying them and then uploading them via SFTP/SSH? Yeah all built it. Structured logging for my web server with a really nice router? Also in the std (the latter one since the last version). I could go on and on and on, but the std is sooooo extensive, it’s insane. Sometimes I’m searching for a package just for the first result being an stdlib package.. haha.

  • @LabMonkey-k2j
    @LabMonkey-k2j 3 месяца назад +7

    0:04 that hand positioning seems like a RSI waiting to happen ?! 😮

    • @SaHaRaSquad
      @SaHaRaSquad 2 месяца назад

      That hurts just to watch. Yeah the keyboard is far too close.

  • @arikiri_698
    @arikiri_698 3 месяца назад

    I came from Python and learned Go recently and I definitely prefer Go. I think it's more beginner friendly in that you can learn a lot more by not using libraries

    • @SaHaRaSquad
      @SaHaRaSquad 2 месяца назад

      Looks like a lot of people never actually looked at Python's stdlib because everyone just uses pip

  • @69k_gold
    @69k_gold 3 месяца назад

    Error handling in Go was not designed for handling system errors like out of memory or keyboard interrupts. So that's a huge downside to give up on Go for me

    • @hamm8934
      @hamm8934 3 месяца назад +1

      Go was initially made as a systems language. It can easily handle those. I wrote a Go cli last month and handled both of those in many places🙃

  • @ΡαφαήλΣαλιάρης-ν5ω
    @ΡαφαήλΣαλιάρης-ν5ω 3 месяца назад +2

    As far as low level languages go C will be my go-to

    • @arc8218
      @arc8218 3 месяца назад +2

      Rust better 😎

  • @Newb1eProgrammer
    @Newb1eProgrammer 3 месяца назад +13

    As a python spoiled child, no packages goes hard

    • @TJackson736
      @TJackson736 3 месяца назад +1

      In C, which Go is a descendant of, you write your own packages. Even when they exist, C programmers will write their own version. It is a totally different mindset to Python and JS.

    • @Newb1eProgrammer
      @Newb1eProgrammer 3 месяца назад

      @@TJackson736 Literally every python package is made with C and C++, i really look up to C and C++ coders knowing I'll never be one of them (I know C# so maybe yes)

    • @ThomasVWorm
      @ThomasVWorm 3 месяца назад +2

      ​@@TJackson736so C-programmers do reinvent the wheel as often as they can?

    • @hamm8934
      @hamm8934 3 месяца назад

      ⁠@@ThomasVWorm this is why C devs are on average better programmers

    • @ThomasVWorm
      @ThomasVWorm 3 месяца назад

      @@hamm8934 what does it help, when it does not bring us forward? They keep on writing operating systems and the computers are idle, because an OS alone does not help.

  • @hikari1690
    @hikari1690 17 дней назад

    Ngl I thought the go mascot was him drawn in cartoon at first...

  • @timur.shhhhh
    @timur.shhhhh 7 дней назад

    why is everyone talking about the speed of Golang? I compared the basic example, 1000 Fibonacci numbers on js, python, go
    Result:
    Python: 88 ms
    Js: 90 ms
    GoRunCommand: 612ms
    GoBuild: 467 ms
    GoStartExe: 512 ms
    Where is the speed???

  • @graemechapman41
    @graemechapman41 3 месяца назад

    Most javascript codes would be a lot better if people didn't insist on importing loads of unnecessary dependencies

  • @tidy5156
    @tidy5156 3 месяца назад +2

    i never understand why it's so loved for backends because JSON parsing is hell 😂
    Also it won't compile if there is an unused import. So often you can't just comment out code to test smth real quick if that is the only use of that import

    • @CodingWithLewis
      @CodingWithLewis  3 месяца назад

      True, I use GoLand and it automatically takes out the unused import for me.

    • @tidy5156
      @tidy5156 3 месяца назад

      ​@@CodingWithLewis really? Thats cool. For me the compiler just complaints and aborts. I never found a flag that maybe overrides this

    • @hamm8934
      @hamm8934 3 месяца назад +3

      @@tidy5156you can just put an underscore before the import and the compiler will allow the unused import.

    • @hamm8934
      @hamm8934 3 месяца назад

      @@tidy5156just put an underscore before the import name

    • @tidy5156
      @tidy5156 2 месяца назад

      ​@@hamm8934sounds tedious bit thanks

  • @charlesbcraig
    @charlesbcraig 3 месяца назад +4

    My complaint about Go is that it’s not fancy 😂. It’s a fantastic language (I use it) and super fast, but I miss the syntactic sugar of Ruby or functional languages. I started learning F# (but hardly anyone uses it) and now OCaml because I want more magic haha. When I’m ready to give up if statements I’ll dive into Gleam 😁

  • @sundae6610
    @sundae6610 3 месяца назад

    those print statement sometime still needed for logic flaw

  • @jaysistar2711
    @jaysistar2711 2 месяца назад +1

    Rust error handling is similar, but can be less verbose using the `?` operator.

    • @osbourn5772
      @osbourn5772 Месяц назад +1

      Rust has semantically better error handling. In Rust, you return an error, in Go, you return both an error and a junk value.

    • @jaysistar2711
      @jaysistar2711 Месяц назад

      ​@@osbourn5772Yes. For anyone who missed what was implied: Rust enums, like Result, are discriminated unions, meaning that the same memory space is used for either the success value or error value, while Go uses what is basically a tupple where space for both the success and error values are allocated even though only 1 is actually used.

    • @emilnymann8723
      @emilnymann8723 22 дня назад

      @@jaysistar2711 nil is not reallocated for every variable pointer.

    • @jaysistar2711
      @jaysistar2711 20 дней назад

      ​​@@emilnymann8723Yes, space on the stack is allocated for nil in Go. If you have an error, then it's allocated on the heap, and the pointer is on the stack. In Rust, on the stack in the area of the returned value there's a discriminate, and then space for either the value or the error inline on the stack.

  • @DrMorax
    @DrMorax 3 месяца назад +1

    Make more Go content ^^

  • @Grandfather__
    @Grandfather__ Месяц назад

    Go's package system is killing me. Hello from cpp.

  • @salty_cucumber
    @salty_cucumber 2 месяца назад

    Straight to the point with cons!
    I tried to make a simple roguelike engine to learn Go and this language felt fascinating. But in practice, when it comes to communicating outside of your program like querying redis or http or db it becomes garbage. 50% of your code is literally THE SAME THREE LINES of code. This is so cringe. At least they can provide some kind of error return operator (ahem throw ahem) to make it much more shorter right? Hell no, Go is designed to be simplistic. Even ternary operator does not exist in Go, so... I am thinking to learn Gleam or Zig

    • @everyhandletaken
      @everyhandletaken 2 месяца назад

      I'm not really sure what you mean.. you can handle an error in 1 line or incorporate with your function call & panic exists. idk

  • @jeffmccloud905
    @jeffmccloud905 3 месяца назад +42

    "You don't have to write those print statements"... are you telling me you don't know how to use breakpoints and watches??

    • @brandonjoaocastillo7490
      @brandonjoaocastillo7490 3 месяца назад +3

      I dont, and I have met no one that does, so what? nobody uses that thing

    • @jeffmccloud905
      @jeffmccloud905 3 месяца назад

      @@brandonjoaocastillo7490 time to level up my guy.

    • @nithinsvarrier670
      @nithinsvarrier670 3 месяца назад +5

      Well most times writing print statements are far more efficient that setting up dap

    • @jeffmccloud905
      @jeffmccloud905 3 месяца назад

      @@brandonjoaocastillo7490 do you work as a developer?

    • @jeffmccloud905
      @jeffmccloud905 3 месяца назад +4

      @@nithinsvarrier670 is quicker. Not more efficient. For example breakpoints can have conditions applied to them (i.e. "only break when x > 7 and y != null" or whatever). To do the same with print statements, you'd have to write that if statement

  • @thanatosjamie7663
    @thanatosjamie7663 2 месяца назад

    Why were you using threadpool executor?
    Python asyncio has better handling for concurrency

  • @justarandomstranger1
    @justarandomstranger1 3 месяца назад

    I feel being so called out when you say python and javascript and do the boom sound lmao. Didn't expect to be so called out, i usually use those and java. The moment i touch something like c++ already make me realize i am ultra spoiled

  • @FabioGamingFG
    @FabioGamingFG 3 месяца назад +1

    The packages are what I dislike so much about Python and JS

    • @muyou0107
      @muyou0107 3 месяца назад

      You can choose not to use them though...

    • @FabioGamingFG
      @FabioGamingFG Месяц назад

      ​@@muyou0107and then you're dropping yourself out of half the community support
      Not to mention how bad PIP is, python is a badly designed language and JS is used in fields it should not be used in

  • @Ocean7653
    @Ocean7653 3 месяца назад

    I’d love a link to the project if possible a tutorial

  • @rashadseada5789
    @rashadseada5789 23 дня назад

    Well back to being straight bro❤😂

  • @a-yo9312
    @a-yo9312 3 месяца назад +8

    JavaScript and Python spoilt me with too many packages 😂😂

  • @loli42
    @loli42 9 дней назад

    >"error handling is verbose"
    >literally just 'if error { handle_error() }'
    god bless

  • @StinkyCatFarts
    @StinkyCatFarts 2 месяца назад +1

    Golangers would rather reinvent the wheel than have a well coded library.

  • @megafoxatron3rd521
    @megafoxatron3rd521 3 месяца назад +3

    Would you recommend it?

    • @CodingWithLewis
      @CodingWithLewis  3 месяца назад +1

      Absolutely! Even though I complained about the verbosity of the error handling... it forces you to actually take into account errors that can happen.

  • @rahimrahim2720
    @rahimrahim2720 3 месяца назад

    Hi Lewis i have a question
    I have about 3 years of experience with Python and i started learning web development about 1.5 year .
    I began with frontend (HTML, CSS, and JavaScript) and then moved on to backend with Django and MySQL.I haven't learned API yet.
    I also hold a master's degree in urban planning (not related to IT).
    Can you help me to move forward and give some advice.
    And if you can tell me how/when i can begin starting applaying to jobs.
    I hope you read it and give me your thoughts.

  • @eptic-c
    @eptic-c 2 месяца назад

    Go error handling is unreadable because the only readable error handling people are used to is NO error handling.
    It is way more readable then try {} catch () {}

  • @Lumither-404
    @Lumither-404 3 месяца назад +7

    add-two-numbers and sum packages are crazy, reminds me of is-odd

  • @ShreyanshGajjar-k1s
    @ShreyanshGajjar-k1s 3 месяца назад

    How did u learn it?? I wanna try it too

  • @NarutoHugsMikasa
    @NarutoHugsMikasa 3 месяца назад

    I lost it when he said he comes from Python 😂

  • @LemonZ89
    @LemonZ89 28 дней назад

    I really tried. I made an array of size 5. Then I made a slice on the middle 3 elements. Adding an item on the slice mutates the last element of the parent array. Adding another one decouples the slice from the underlying array, so if you then alter the first item on the slice, the not-longer underlying array is unchanged. Wtf? Who designs a language like that? Why are even slices mutable?

  • @XxMissingDataxX
    @XxMissingDataxX 2 месяца назад

    Where you learn it at?

  • @dus10dnd
    @dus10dnd 2 месяца назад

    Dude, readability is the last possible thing someone could say about Go error handling. If you can't read that, you can't program or read. It is a small set of three iconic lines. Skill issue!

  • @CodeFun691
    @CodeFun691 3 месяца назад

    No they don't spoil you. You are just not handling errors because the language doesn't signal to you that there COULD be an error.

  • @urizen959
    @urizen959 3 месяца назад +1

    bro errors as values >>>>..

  • @Simi1024
    @Simi1024 2 месяца назад

    It's my favourite programming language

  • @GigachadRustacean-lu8bo
    @GigachadRustacean-lu8bo 3 месяца назад +1

    he finally gave up on rust lol

  • @Percenttwoeff
    @Percenttwoeff 2 месяца назад

    Would u say more intuitive than C/C++?

  • @mx338
    @mx338 3 месяца назад

    Go error handling isn't as smart as that of Rust or Gleam, and that sucks because Go is a new language like Rust, but they only chose to simplify things, instead of also making them better.

  • @Germisstucklmao
    @Germisstucklmao 3 месяца назад

    Try Nim next please

  • @johnnycincocero
    @johnnycincocero 2 месяца назад

    What keyboard is that?

  • @zxnnightstalker2289
    @zxnnightstalker2289 2 месяца назад

    What's your theme when you are talking about go error handling pros.

  • @janclydetalosig8668
    @janclydetalosig8668 3 месяца назад +1

    Where do you guys learn languages? I wanna start c++ but I don't know where I can study it. I don't want to stick to just HTML and CSS ( my Junior Highschool Teacher taught me HTML and CSS )

    • @arc8218
      @arc8218 3 месяца назад +1

      Just start Rust, its better

    • @arc8218
      @arc8218 3 месяца назад

      Learn it from anywhere, freecodecamp, yt videos etc
      As long u learn using practice not just reading and watching

    • @rohangoparaju2579
      @rohangoparaju2579 3 месяца назад

      ​@@arc8218if rust is his first language then he will have a hard time getting a grip on the language so in my humble opinion start with any other programming language like c to understand what is what and move to rust to develop a scalable application. That will be great.

    • @janclydetalosig8668
      @janclydetalosig8668 3 месяца назад

      @@arc8218 where is that

    • @janclydetalosig8668
      @janclydetalosig8668 3 месяца назад

      @@arc8218 and if rust is a Language, sorry bro but I really need c++ for Arduino and ESP32 that's why I want to study that

  • @hamm8934
    @hamm8934 3 месяца назад

    So many people with less than 2 hours of go experience in this comment section writing off go for the silliest reasons lol

  • @whimahwhe
    @whimahwhe 3 месяца назад

    Data in go is king

  • @tc2241
    @tc2241 Месяц назад

    Oddly enough the forced err handling got me to write better err handling logic in other languages 😅

  • @yeahaddigirl
    @yeahaddigirl 22 дня назад

    You can write apps for TL draw?

  • @theunknown2090
    @theunknown2090 3 месяца назад

    Just create a function for error handling put pass err and string message in go lang

  • @Iwasonceanonionwithnolayers
    @Iwasonceanonionwithnolayers 2 месяца назад

    Wouldn't it be easier to create a function that does the same thing, in Python?

  • @roccociccone597
    @roccociccone597 16 дней назад

    The lack of packages is a good thing. Otherwise we’ll end up like the js people who can’t figure out whether a number is even or odd without a library.

    • @User948Z7Z-w7n
      @User948Z7Z-w7n 10 дней назад

      everything is a package in go isn't it

  • @R00kTruth
    @R00kTruth 13 дней назад

    if you really want to be a better programmer, then use C, not c#, not c++, standard C
    using standard C with a good debugger, you'll actually learn how to program 1000 times better, you'll get a deeper understanding of how computer works...
    Once you start reverse engineering your own work,(code) !

  • @rnp0728
    @rnp0728 2 месяца назад

    The amount of errors handled in 2-3 go projects is always > the total errors handled by a js or python dev😂 its a fact

  • @BlueBetaPro
    @BlueBetaPro 2 дня назад

    Go is fantastic, keep your dirty JavaScript hands off my boy.

  • @Delta5by5
    @Delta5by5 3 месяца назад +2

    Welcome Gopher

  • @6pfk
    @6pfk 3 месяца назад

    go write once compile for everything.😊 know rust does but I'm not a 10x developer.

  • @mannepallibalaji8786
    @mannepallibalaji8786 3 месяца назад

    Any good resources to learn GOlang?

  • @xXxChildPredatorxXx-ix8gi
    @xXxChildPredatorxXx-ix8gi 3 месяца назад

    ray william johnson

  • @cod3ddy74
    @cod3ddy74 2 месяца назад

    i was about to start cooking you haha

  • @N1NJ0J
    @N1NJ0J Месяц назад

    The GoPro grammar language

  • @svetlinzarev3453
    @svetlinzarev3453 3 месяца назад

    Lol, the error handling in go is a cruel joke

  • @temynator
    @temynator 3 месяца назад +12

    Is it true that when you learn a language you can learn other languages much easier??? 🤔🤔🤔🤔

    • @martinmetskula6384
      @martinmetskula6384 3 месяца назад +3

      110%

    • @arc8218
      @arc8218 3 месяца назад +2

      For some people
      But if you learn js/python first 😅😅 now that's problem

    • @ThomasVWorm
      @ThomasVWorm 3 месяца назад +4

      Yes and no.
      Programming languages influence the way you think about problems. So if you know an OO language, learning another OO language should be easy.
      But when you start to learn eg. a functional language as a second language, knowing OO will be a burden.

    • @-Cocell
      @-Cocell 3 месяца назад

      @@arc8218My reaction be like: 💀💀

    • @prathix4339
      @prathix4339 3 месяца назад

      yes, I learnt c++, and now I can learn a language in a couple of days(basic syntax 10 minutes than the resr for the language specific syntax)

  • @stephenreaves3205
    @stephenreaves3205 2 месяца назад

    Error handling SHOULD be verbose

  • @siteantipas6837
    @siteantipas6837 3 месяца назад +5

    😅😅😅 I mean, I come from Python and Javascript:
    Oooh hell nooh!!!
    😅😅😅

  • @khushalnikam3561
    @khushalnikam3561 2 месяца назад

    Can go replace python?

  • @aGj2fiebP3ekso7wQpnd1Lhd
    @aGj2fiebP3ekso7wQpnd1Lhd Месяц назад

    Good for you. I like Python style but it's slow and janky. Wouldn't want to build a production app out of it. Go on the other hand has been a rock-solid rocket ship. I run hundreds of millions of concurrent TLS connections with it at an order of magnitude cheaper than comparables like erlang.

  • @unknowrabbit666
    @unknowrabbit666 2 месяца назад

    I just wish golang could be less verbose

  • @meuscc
    @meuscc 2 месяца назад +1

    加上rust的error handling 的话 我会用go的

  • @mundiakaluson
    @mundiakaluson 3 месяца назад

    Now try installing a C library

  • @RamanSharma-zk1bj
    @RamanSharma-zk1bj 3 месяца назад

    Basic maths package 😂

  • @AslamNazeerShaikh
    @AslamNazeerShaikh 3 месяца назад

    Habibi.. try c# ❤🎉

  • @syngress
    @syngress 2 месяца назад

    Google promoting thier ad without tag!!